nerfstudio icon indicating copy to clipboard operation
nerfstudio copied to clipboard

v1.0.2 Unable to train/install ZipNerf

Open Renbry opened this issue 1 year ago • 6 comments

Hi all,

With Nerfstudio v1.0.2 I have an issue of install failing when running the zipnerf model - Run : ns-train zipnerf It asks if I want to install the package, Yes.

Errors out on several Windows (10+11) machines with :

ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\Users\renbr\anaconda3\envs\nerfstudio\Lib\site-packages\cv2\cv2.pyd' Consider using the --user option or check the permissions.

Error installing method.

Anyone know what to try next ? it's a fresh install (1hr old!) and happens across all my windows machines. Tried turning off ReadOnly and verified permissions on the file + folder. The "--user" command seems to need to be applied to the internal command that is run by ns-train to install the model so I don't have transparency into that cvar.

Thanks so much,

Renbry avatar Feb 25 '24 21:02 Renbry

The the installation instructions here - https://docs.nerf.studio/nerfology/methods/zipnerf.html#installation

tancik avatar Feb 25 '24 23:02 tancik

@tancik Thanks - spotted that but was hoping in-built functionality worked as it seemed to suggest.

Using this install method I get a completely different fail saying it 'couldn't find a supported Microsofot Visual C++ Installation' which is a surprise and annoyance. Using VS2022 successfully to install Nerfstudio and other repos so this is more of a dead end than the attempt to use the built-in install function.

Oh well!

Renbry avatar Feb 26 '24 04:02 Renbry

(nerfstudio) C:\Users\renbr>pip install git+https://github.com/SuLvXiangXin/zipnerf-pytorch#subdirectory=extensions/cuda Collecting git+https://github.com/SuLvXiangXin/zipnerf-pytorch#subdirectory=extensions/cuda Cloning https://github.com/SuLvXiangXin/zipnerf-pytorch to c:\users\renbr\appdata\local\temp\pip-req-build-54wk7ook Running command git clone --filter=blob:none --quiet https://github.com/SuLvXiangXin/zipnerf-pytorch 'C:\Users\renbr\AppData\Local\Temp\pip-req-build-54wk7ook' Resolved https://github.com/SuLvXiangXin/zipnerf-pytorch to commit af86ea6340b9be6b90ea40f66c0c02484dfc7302 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 "", line 2, in File "", line 34, in File "C:\Users\renbr\AppData\Local\Temp\pip-req-build-54wk7ook\extensions/cuda\setup.py", line 29, in raise RuntimeError("Could not locate a supported Microsoft Visual C++ installation") RuntimeError: Could not locate a supported Microsoft Visual C++ installation [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.

Renbry avatar Feb 26 '24 04:02 Renbry

I would suggest asking this question in the zipnerf repo since the error seems to exist there - https://github.com/SuLvXiangXin/zipnerf-pytorch

tancik avatar Feb 26 '24 04:02 tancik

Thanks again, Found a discussion from July '23 with no answer. I'll dig harder!

Renbry avatar Feb 26 '24 05:02 Renbry

@Renbry It seems to be related to the c++ environment? Maybe you can refer to the first and second answers here: https://stackoverflow.com/questions/71470989/python-setup-py-bdist-wheel-did-not-run-successfully

Jing1Ling avatar Feb 28 '24 03:02 Jing1Ling