nerfstudio-project / nerfstudio

A collaboration friendly studio for NeRFs
https://docs.nerf.studio
Apache License 2.0
8.87k stars 1.18k forks source link

having problem in installing as document... #3187

Open kotran88 opened 1 month ago

kotran88 commented 1 month ago

I think I already install cuda 11.8


>Nvcc --version
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

and when I command following command as document says,


conda create --name nerfstudio -y python=3.8
conda activate nerfstudio
pip install --upgrade pip

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 ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

everything is okay untill pip install ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

when above command, it cause error


Collecting git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
  Cloning https://github.com/NVlabs/tiny-cuda-nn/ to c:\users\pedro\appdata\local\temp\pip-req-build-dk1wroo_
  Running command git clone --filter=blob:none --quiet https://github.com/NVlabs/tiny-cuda-nn/ 'C:\Users\pedro\AppData\Local\Temp\pip-req-build-dk1wroo_'
  Resolved https://github.com/NVlabs/tiny-cuda-nn/ to commit 4892659e015b12bd2fce446b8a8e33e646b21746
  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
  ╰─> [10 lines of output]
      C:\Users\pedro\AppData\Local\Temp\pip-req-build-dk1wroo_\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
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\pedro\AppData\Local\Temp\pip-req-build-dk1wroo_\bindings/torch\setup.py", line 11, in <module>
          from torch.utils.cpp_extension import BuildExtension, CUDAExtension
        File "C:\Users\pedro\anaconda3\envs\nerf\lib\site-packages\torch\utils\cpp_extension.py", line 28, in <module>
          from pkg_resources import packaging  # type: ignore[attr-defined]
      ImportError: cannot import name 'packaging' from 'pkg_resources' (C:\Users\pedro\anaconda3\envs\nerf\lib\site-packages\pkg_resources\__init__.py)
      [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.

I did training and can make render video but it takes almost a day to render video...so I think I should install tiny cuda but it cause error above...

abrahamezzeddine commented 4 weeks ago

Try #3159 and see if it works.

kotran88 commented 4 weeks ago

@abrahamezzeddine
same after install setuptools-70.0.0 successfully

abrahamezzeddine commented 4 weeks ago

@abrahamezzeddine same after install setuptools-70.0.0 successfully

I do not understand. Did you install 70.0.0 again? You will then of course see the same issue. You have to downgrade to a lower version, as mentioned in my resolution.

install setuptools==69.5.1

Shaka91 commented 2 weeks ago

I am having the same issue as the one mentioned above. I have downgraded to setuptools==69.5.1, but the error persists. Any idea of how to solve this?

abrahamezzeddine commented 2 weeks ago

I am having the same issue as the one mentioned above. I have downgraded to setuptools==69.5.1, but the error persists. Any idea of how to solve this?

Can you show the log?