tiny-cuda-nn
tiny-cuda-nn copied to clipboard
tiny cuda install error
(nerfstudio) C:\Users\17069\Desktop\NS>pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch Collecting git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch Cloning https://github.com/NVlabs/tiny-cuda-nn/ to c:\users\17069\appdata\local\temp\pip-req-build-lwxzpvk6 Running command git clone --filter=blob:none --quiet https://github.com/NVlabs/tiny-cuda-nn/ 'C:\Users\17069\AppData\Local\Temp\pip-req-build-lwxzpvk6' Resolved https://github.com/NVlabs/tiny-cuda-nn/ to commit 8e6e242f36dd197134c9b9275a8e5108a8e3af78 Running command git submodule update --init --recursive -q Preparing metadata (setup.py) ... error error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "
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.
What is causing this?
try to install pytorch
try to install pytorch
Could you tell me how to solve this problem?
try to install pytorch
Could you tell me how to solve this problem?
pip install torch
I'm getting the same error.
Torch is installed -- I'm in a venv and, when running python, "import torch" works fine.
Note that the installation is run from nerfstudio installation instructions:
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
Which I also modified, for bash to not ignore the # comment, to:
pip install 'git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch'
I've yet to solve it.
[Edit] Upon further consideration, that exec() leads me to believe the current environment might not be making it through to the exec'ed subprocess -- it's losing the venv and using the system-wide python/python modules. Not solved yet.
I just encountered the same issue. I used to be able to go like this:
export PYTHONPATH="/tmp/tri/pip/"
export PIP="--target '/tmp/tri/pip/' --cache-dir '/tmp/tri/cache/'"
python3 -m pip install $PIP --upgrade pip setuptools ninja torch==1.12.1+cu113 torchvision==0.13.1+cu113 functorch==0.2.1 torchmetrics -f https://download.pytorch.org/whl/torch_stable.html
python3 -m pip install $PIP --upgrade 'git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch'
...
But this broke for me today giving me the same No module named 'torch'
error. Not sure what the problem is but I managed to get it working again using pyenv.
# install pyenv to alternative location
export PYENV_ROOT="/tmp/tri/pyenv"
curl https://pyenv.run | bash
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# setup new env
pyenv install 3.9.16
pyenv virtualenv 3.9.16 venv_nerf
pyenv activate venv_nerf
pip install --upgrade pip setuptools ninja torch==1.12.1+cu113 torchvision==0.13.1+cu113 functorch==0.2.1 torchmetrics -f https://download.pytorch.org/whl/torch_stable.html
pip install --upgrade 'git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch'
...
I was also getting the same error. Even after setting up the correct Python path in the virtual env, it was not able to find Torch. So instead of getting the Pytorch extension, I installed it from a local clone as mentioned in the readme file.
I was also getting the same error. Even after setting up the correct Python path in the virtual env, it was not able to find Torch.
You're right, I just tried it again and ran into the same issues following my instructions. I was able to fix it again by omitting the pip upgrade to 23.1.2. Everything seems to work as expected with pip 23.0.1.
pip 23.0.1 here, getting the same error. Tried python 3.9, 3.10 and 3.11 so far.
I encountered the same error. I uninstalled all the packages I had installed with pip and then reinstalled tiny-cuda-nn following the Nerf Studio guide.