thomgrand / torch_kdtree

Port of cp_kdtree to pytorch
MIT License
29 stars 7 forks source link

install err #6

Closed fankeyu123 closed 2 months ago

fankeyu123 commented 3 months ago

when run pip install . i met some err: Building wheel for torch_kdtree (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for torch_kdtree (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [80 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-310 creating build/lib.linux-x86_64-cpython-310/torch_kdtree copying torch_kdtree/nn_distance.py -> build/lib.linux-x86_64-cpython-310/torch_kdtree copying torch_kdtree/init.py -> build/lib.linux-x86_64-cpython-310/torch_kdtree running build_ext -- The CXX compiler identification is GNU 9.5.0 -- The CUDA compiler identification is unknown CMake Error at /tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/cmake/data/share/cmake-3.30/Modules/CMakeDetermineCUDACompiler.cmake:266 (message): Failed to detect a default CUDA architecture.

    Compiler output:

  Call Stack (most recent call first):
    CMakeLists.txt:4 (project)

  -- Configuring incomplete, errors occurred!
  Building extension...
  Building extension #2...
  Build temp dir:  build/temp.linux-x86_64-cpython-310 /home/f50039529/mvsplat-main/mvsplat-main/src/torch_kdtree/build/lib.linux-x86_64-cpython-310/
  Traceback (most recent call last):
    File "/home/f50039529/anaconda3/envs/mvsplat/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/home/f50039529/anaconda3/envs/mvsplat/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/f50039529/anaconda3/envs/mvsplat/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 415, in build_wheel
      return self._build_with_temp_dir(
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
      self.run_setup()
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 313, in run_setup
      exec(code, locals())
    File "<string>", line 143, in <module>
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 108, in setup
      return distutils.core.setup(**attrs)
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
      return run_commands(dist)
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
      dist.run_commands()
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands
      self.run_command(cmd)
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 945, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/command/bdist_wheel.py", line 373, in run
      self.run_command("build")
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 945, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 945, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 93, in run
      _build_ext.run(self)
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
      self.build_extensions()
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 479, in build_extensions
      self._build_extensions_serial()
    File "/tmp/pip-build-env-k8cher8f/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 505, in _build_extensions_serial
      self.build_extension(ext)
    File "<string>", line 129, in build_extension
    File "/home/f50039529/anaconda3/envs/mvsplat/lib/python3.10/subprocess.py", line 369, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '/home/f50039529/mvsplat-main/mvsplat-main/src/torch_kdtree', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/f50039529/mvsplat-main/mvsplat-main/src/torch_kdtree/build/lib.linux-x86_64-cpython-310', '-DPYTHON_EXECUTABLE=/home/f50039529/anaconda3/envs/mvsplat/bin/python', '-DEXAMPLE_VERSION_INFO=1.0', '-DCMAKE_BUILD_TYPE=Release', '-DPIP_BUILD=ON']' returned non-zero exit status 1.
thomgrand commented 3 months ago

Hi, the main problem seems to be Failed to detect a default CUDA architecture, which is a prerequisite for installation. Can you run nvcc --version on your command line to verify that you have successfully installed CUDA?

thomgrand commented 2 months ago

Closing due to inactivity.