graphdeco-inria / gaussian-splatting

Original reference implementation of "3D Gaussian Splatting for Real-Time Radiance Field Rendering"
https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/
Other
14.47k stars 1.89k forks source link

Questions on Installation of simple_knn #771

Open liyw420 opened 6 months ago

liyw420 commented 6 months ago

pip install submodules/simple-knn/

Then errors occur:

Processing ./submodules/simple-knn Preparing metadata (setup.py) ... done Building wheels for collected packages: simple-knn Building wheel for simple-knn (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [80 lines of output] /home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/torch/cuda/init.py:118: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 803: system has unsupported display driver / cuda driver combination (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:108.) return torch._C._cuda_getDeviceCount() > 0 No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.8' running bdist_wheel /home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/torch/utils/cpp_extension.py:499: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) running build running build_ext /home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/torch/utils/cpp_extension.py:428: UserWarning: There are no g++ version bounds defined for CUDA version 11.8 warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}') building 'simple_knn._C' extension creating build/temp.linux-x86_64-cpython-311 gcc -pthread -B /home/vincent/ProgramFiles/miniconda3/envs/3dgs/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/vincent/ProgramFiles/miniconda3/envs/3dgs/include -fPIC -O2 -isystem /home/vincent/ProgramFiles/miniconda3/envs/3dgs/include -fPIC -I/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/torch/include -I/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/torch/include/TH -I/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/torch/include/THC -I/usr/local/cuda-11.8/include -I/home/vincent/ProgramFiles/miniconda3/envs/3dgs/include/python3.11 -c ext.cpp -o build/temp.linux-x86_64-cpython-311/ext.o -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17 /home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/torch/utils/cpp_extension.py:1967: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation. If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST']. warnings.warn( /home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/torch/cuda/init.py:619: UserWarning: Can't initialize NVML warnings.warn("Can't initialize NVML") Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/home/vincent/Research/code/gaussian-splatting/submodules/simple-knn/setup.py", line 21, in setup( File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/init.py", line 103, in setup return distutils.core.setup(**attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) ^^^^^^^^^^^^^^^^^^ File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/dist.py", line 989, in run_command super().run_command(command) File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 364, in run self.run_command("build") File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/dist.py", line 989, in run_command super().run_command(command) File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run self.run_command(cmd_name) File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/dist.py", line 989, in run_command super().run_command(command) File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 88, in run _build_ext.run(self) File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run self.build_extensions() File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 870, in build_extensions build_ext.build_extensions(self) File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions self._build_extensions_serial() File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial self.build_extension(ext) File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 249, in build_extension _build_ext.build_extension(self, ext) File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension objects = self.compiler.compile( ^^^^^^^^^^^^^^^^^^^^^^ File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/setuptools/_distutils/ccompiler.py", line 600, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 606, in unix_wrap_single_compile cflags = unix_cuda_flags(cflags) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 573, in unix_cuda_flags cflags + _get_cuda_arch_flags(cflags)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 1987, in _get_cuda_arch_flags arch_list[-1] += '+PTX'


      IndexError: list index out of range
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for simple-knn
  Running setup.py clean for simple-knn
Failed to build simple-knn
ERROR: Could not build wheels for simple-knn, which is required to install pyproject.toml-based projects
liyw420 commented 6 months ago

Here is my environment: RTX 4090, cudatoolkit 11.8.0, python=3.11.8, torch==2.2.2+cu118,torchaudio==2.2.2+cu118, torchvision==0.17.2+cu118

Does anyone know how to solve this problem?


File "/home/vincent/ProgramFiles/miniconda3/envs/3dgs/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 1987, in _get_cuda_arch_flags
arch_list[-1] += '+PTX'

IndexError: list index out of range
[end of output]
liyw420 commented 6 months ago

I have tried different version combinations of python&pytorch, but it doesn't work. "diff-gaussian-rasterization" can be installed successfully, but "simple-knn" can't, always with the error "arch_list[-1] += '+PTX' ", "IndexError: list index out of range"

vivi-gomez commented 6 months ago

I have this problem too. I have simple_kNN instaled but the script seems to look for simple_knn

Noob-PeNguiN commented 6 months ago

I have this problem too, can't solve it yet

liyw420 commented 6 months ago

Sorry for the delay. I solved this problem just by reboot the computer. I don’t know why but it works. Maybe you can try this

Get Outlook for iOShttps://aka.ms/o0ukef


From: Noob-PeNguiN @.> Sent: Sunday, April 28, 2024 4:22:08 PM To: graphdeco-inria/gaussian-splatting @.> Cc: yiwei-vincent-li @.>; Author @.> Subject: Re: [graphdeco-inria/gaussian-splatting] Questions on Installation of simple_knn (Issue #771)

I have this problem too, can't solve it yet

— Reply to this email directly, view it on GitHubhttps://github.com/graphdeco-inria/gaussian-splatting/issues/771#issuecomment-2081388503, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BCNDKQKFNWULE62JHR36UVTY7SWTBAVCNFSM6AAAAABGXB4QSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBRGM4DQNJQGM. You are receiving this because you authored the thread.Message ID: @.***>