- https://docs.nerf.studio/quickstart/installation.html
- install/upgrade Anaconda for windows (old versions wont work)
- vs install those MSVC 143 packages (i installed for 2019 and 2022)
- // SKIP: use Everything ( https://www.voidtools.com/) to find vcvars64.bat
- // SKIP: i had it at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build , run from commandline: vcvars64.bat **I DIDNT DO THIS later
- run anaconda prompt
- make nerfstudio folder, go there
- // SKIP: run "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
- conda create --name nerfstudio -y python=3.8
- conda activate nerfstudio
- python -m pip install --upgrade pi
- pip uninstall torch torchvision functorch tinycudann
- pip install torch==2.1.2+cu118 torchvision==0.16.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
- conda install -c "nvidia/label/cuda-11.8.0" cuda-toolkit
- pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
- install rust https://www.rust-lang.org/tools/install
- git clone https://github.com/nerfstudio-project/nerfstudio.git
- cd nerfstudio
- pip install --upgrade pip setuptools
- pip install -e .
https://github.com/nerfstudio-project/nerfstudio?tab=readme-ov-file#2-training-your-first-model
- download sample data: ns-download-data nerfstudio --capture-name=poster
- train it: ns-train nerfacto --data data/nerfstudio/poster
- open browser: http://localhost:7007
RuntimeError:
The detected CUDA version (9.1) mismatches the version that was used to compile
PyTorch (11.8). Please make sure to use the same CUDA versions
check cuda version: nvcc --version on command prompt i had: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2017 NVIDIA Corporation Built on Fri_Nov__3_21:08:12_Central_Daylight_Time_2017 Cuda compilation tools, release 9.1, V9.1.85
in conda: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:41:10_Pacific_Daylight_Time_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0
I had 9.1 version installed in Windows (Remove from Uninstall applications)
Building wheels for collected packages: tinycudann
Building wheel for tinycudann (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
C:\Users\username\AppData\Local\Temp\pip-req-build-vdmv54m4\bindings/torch\setup.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
from pkg_resources import parse_version
Building PyTorch extension for tiny-cuda-nn version 1.7
Obtained compute capability 75 from PyTorch
Detected CUDA version 11.8
Targeting C++ standard 17
running bdist_wheel
C:\progs\anaconda2\envs\nerfstudio\lib\site-packages\torch\utils\cpp_extension.py:502: 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_py
creating build\lib.win-amd64-cpython-38\tinycudann
copying tinycudann\modules.py -> build\lib.win-amd64-cpython-38\tinycudann
copying tinycudann\__init__.py -> build\lib.win-amd64-cpython-38\tinycudann
running egg_info
creating tinycudann.egg-info
writing tinycudann.egg-info\PKG-INFO
writing dependency_links to tinycudann.egg-info\dependency_links.txt
writing top-level names to tinycudann.egg-info\top_level.txt
writing manifest file 'tinycudann.egg-info\SOURCES.txt'
reading manifest file 'tinycudann.egg-info\SOURCES.txt'
writing manifest file 'tinycudann.egg-info\SOURCES.txt'
copying tinycudann\bindings.cpp -> build\lib.win-amd64-cpython-38\tinycudann
running build_ext
error: [WinError 2] The system cannot find the file specified
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for tinycudann
Running setup.py clean for tinycudann
pip install ninja (doesnt help) install newer anaconda? remember to restart pc also.
(nerfstudio) E:\work\nerfstudio>conda install -c conda-forge tinycudann
Solving environment: failed
CondaValueError: Malformed version string '~': invalid character(s).
install newer anaconda? remember to restart pc also.
anaconda navigator stuck on "adding featured channels"
ContinuumIO/anaconda-issues#10484 (comment) Reinstalled Anaconda (removed old one, restarted pc)
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Cargo, the Rust package manager, is not installed or is not on PATH.
This package requires Rust and Cargo to compile extensions. Install it through
the system's package manager or via https://rustup.rs/
Checking for Rust toolchain....
[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.
install rust from web to pc, https://www.rust-lang.org/tools/install close anaconda console and start again (to get upgraded PATH)