threestudio-project / threestudio

A unified framework for 3D content generation.
Apache License 2.0
6.32k stars 480 forks source link

Issue with installing tinycudann on windows #368

Closed Straafe closed 11 months ago

Straafe commented 11 months ago

Has anyone set up the environment on Windows? Getting an error when installing requirements when it tries to install tinycudann:

  DEPRECATION: tinycudann is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for tinycudann ... \

And the error:

      nvcc warning : incompatible redefinition for option 'std', the last value of this option was used

      fully_fused_mlp.cu

      ninja: build stopped: subcommand failed.
      Traceback (most recent call last):
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\utils\cpp_extension.py", line 2100, in _run_ninja_build
          subprocess.run(
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 571, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\User\AppData\Local\Temp\pip-req-build-mpc0_p7f\bindings/torch\setup.py", line 189, in <module>
          setup(
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py", line 963, in run_command
          super().run_command(command)
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py", line 78, in run
          return orig.install.run(self)
                 ^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\command\install.py", line 697, in run
          self.run_command('build')
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py", line 963, in run_command
          super().run_command(command)
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
          self.run_command(cmd_name)
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py", line 963, in run_command
          super().run_command(command)
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\build_ext.py", line 88, in run
          _build_ext.run(self)
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
          self.build_extensions()
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\utils\cpp_extension.py", line 873, in build_extensions
          build_ext.build_extensions(self)
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 467, in build_extensions
          self._build_extensions_serial()
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 493, in _build_extensions_serial
          self.build_extension(ext)
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\build_ext.py", line 249, in build_extension
          _build_ext.build_extension(self, ext)
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 548, in build_extension
          objects = self.compiler.compile(
                    ^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\utils\cpp_extension.py", line 845, in win_wrap_ninja_compile
          _write_ninja_file_and_compile_objects(
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\utils\cpp_extension.py", line 1774, in _write_ninja_file_and_compile_objects
          _run_ninja_build(
        File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\utils\cpp_extension.py", line 2116, in _run_ninja_build
          raise RuntimeError(message) from e
      RuntimeError: Error compiling objects for extension
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> tinycudann

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Straafe commented 11 months ago

Just installed it on WSL instead