Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't install #44

Open
Mark-Bassett opened this issue Jun 23, 2023 · 8 comments
Open

can't install #44

Mark-Bassett opened this issue Jun 23, 2023 · 8 comments

Comments

@Mark-Bassett
Copy link

tripping up on
pip install ./gridencoder

falls over on line 195 in version.py
I changed it to this,
match = self._regex.search(str(version))
from this
match = self._regex.search(version)

still does not work, seems to return "none"

spent hours searching the web to no evail.
help appreciated, as this looks to be a very promissing implementation.

thx

@SuLvXiangXin
Copy link
Owner

@Mark-Bassett Please type your error message.

@Mark-Bassett
Copy link
Author

Mark-Bassett commented Jun 23, 2023 via email

@SuLvXiangXin
Copy link
Owner

It seems that you don't have your CUDA installed? Could you check the directory C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7

@Mark-Bassett
Copy link
Author

Mark-Bassett commented Jun 23, 2023 via email

@Mark-Bassett
Copy link
Author

Mark-Bassett commented Jun 23, 2023 via email

@FlorentLM
Copy link

Make sure you install CUDA 11.8

Add this to the top of the requirements.txt file:

--find-links https://download.pytorch.org/whl/torch_stable.html

Specify which version + build of torch further down in the requirements.txt file:

torch==2.0.1+cu118

Run this command in your conda environment:

conda env config vars set CUDA_HOME="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8"

Deactivate / reactivate the env for the CUDA_HOME variable to be set:

conda deactivate
conda activate zipnerf

And then carry on normally:

pip install -r requirements.txt
# etc

@s1eeveW
Copy link

s1eeveW commented May 22, 2024

@FlorentLM Hello, mate. Thanks for your great comment. I followed your comment to install the 'extension/cuda', but I still got some errors.

I installed cuda 11.8 with cudnn 8.9.x.

requirements.txt:
--find-links https://download.pytorch.org/whl/torch_stable.html
numpy
torch==2.0.1+cu118
absl_py
accelerate
gin_config
imageio
imageio[ffmpeg]
matplotlib
mediapy
opencv_contrib_python
opencv_python
Pillow
trimesh
pymeshlab
xatlas
plyfile
rawpy
ninja
scipy
scikit-image
scikit-learn
tensorboard
tensorboardX
tqdm

Then, I got the error:
(zipnerf) E:\zipnerf-pytorch>pip install ./extensions/cuda

Processing e:\zipnerf-pytorch\extensions\cuda
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "E:\zipnerf-pytorch\extensions\cuda\setup.py", line 3, in <module>
          from torch.utils.cpp_extension import BuildExtension, CUDAExtension
        File "E:\Programming\Anaconda\envs\zipnerf\lib\site-packages\torch\utils\cpp_extension.py", line 25, in <module>
          from pkg_resources import packaging  # type: ignore[attr-defined]
      ImportError: cannot import name 'packaging' from 'pkg_resources' (E:\Programming\Anaconda\envs\zipnerf\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.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

If I downgrade the 'setuptools' to 69.5.1 (or other versions), the error would be:

      RuntimeError: Error compiling objects for extension
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cuda_backend
  Running setup.py clean for cuda_backend
Failed to build cuda_backend
ERROR: Could not build wheels for cuda_backend, which is required to install pyproject.toml-based projects

So, do you also meet these errors or have any other good solutions?

Thank you.

@CaffeyChen
Copy link

Same error. Do you slove it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants