build extension problem
Doreeeeen opened this issue · comments
hi, i use
bash scripts/install_ext.sh
It failed with this:
Processing ./raymarching
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/home/jiaod/miniconda3/envs/occnerf/OccNeRF-main/torch-ngp/raymarching/setup.py", line 47, in
CUDAExtension(
File "/home/jiaod/miniconda3/envs/torch-ngp/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 1074, in CUDAExtension
library_dirs += library_paths(cuda=True)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jiaod/miniconda3/envs/torch-ngp/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 1201, in library_paths
if (not os.path.exists(_join_cuda_home(lib_dir)) and
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jiaod/miniconda3/envs/torch-ngp/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 2407, in _join_cuda_home
raise OSError('CUDA_HOME environment variable is not set. '
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
and then i set the CUDA_HOME but still report errors.
what should i do plz!
I had a similar issue, this solution fixed the problem for me