hbb1/2d-gaussian-splatting

Installation error

oUp2Uo opened this issue · 7 comments

Hi, I am trying to install on Windows 11. And I met this error:

Processing d:\workspace\2d-gaussian-splatting\submodules\diff-surfel-rasterization
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'

Pip subprocess 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 "D:\workspace\2d-gaussian-splatting\submodules\diff-surfel-rasterization\setup.py", line 13, in <module>
          from torch.utils.cpp_extension import CUDAExtension, BuildExtension
        File "C:\Users\Up2U\miniconda3\envs\surfel_splatting\lib\site-packages\torch\utils\cpp_extension.py", line 25, >
          from pkg_resources import packaging  # type: ignore[attr-defined]
      ImportError: cannot import name 'packaging' from 'pkg_resources' (C:\Users\Up2U\miniconda3\envs\surfel_splatting\)
      [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.

And I compared with 3DGS's environment.yml, I found no cudatoolkit in dependencies.
Then I tried to add it, and still having this error.

Any idea about this?
Thank you.

Can you check the setuptools version in your environment? This happens if setuptools==70.0.0.
Try downgrading setuptools to <70 like :

python -m pip install setuptools==69.5.1

Can you check the setuptools version in your environment? This happens if setuptools==70.0.0. Try downgrading setuptools to <70 like :

python -m pip install setuptools==69.5.1

Thanks for the reply.
setuptools version is 68.2.2.

hbb1 commented

Did you solve the problem? maybe you can try this #10 (comment)

Did you solve the problem? maybe you can try this #10 (comment)

Thanks for the reply.
Still the same error.

你能检查一下你环境中的setuptools版本吗?如果setuptools==70.0.0,就会发生这种情况。尝试将setuptools降级为<70喜欢:> 你能检查一下你环境中的setuptools版本吗?如果setuptools==70.0.0,就会发生这种情况。尝试将setuptools降级为<70喜欢:>> python -m pip install setuptools==69.5.1>> python -m pip install setuptools==69.5.1

Can you check the setuptools version in your environment? This happens if setuptools==70.0.0. Try downgrading setuptools to <70 like :

python -m pip install setuptools==69.5.1

Genius! It works!

Can you check the setuptools version in your environment? This happens if setuptools==70.0.0. Try downgrading setuptools to <70 like :

python -m pip install setuptools==69.5.1

I have changed to 69.5.1 today, but still the same error.

I have found the question point.

  1. After installation (conda env create --file environment.yml) failed,
    before trying python -m pip install setuptools==69.5.1,
    it is need to call conda activate surfel_splatting first.
    Then call conda env update, would have another error message.

  2. And then try to edit like #10 (comment).

  3. And environment.yml need add plyfile in dependencies section, opencv-python in pip section, or there would be error ModuleNotFoundError: No module named 'plyfile' or ModuleNotFoundError: No module named 'cv2' when training.

  4. At last call conda env update.

This should work.