MyNiuuu / MOFA-Video

Official Pytorch implementation for MOFA-Video: Controllable Image Animation via Generative Motion Field Adaptions in Frozen Image-to-Video Diffusion Model.
https://myniuuu.github.io/MOFA_Video
Other
358 stars 22 forks source link

get error when pip install "git+https://github.com/facebookresearch/pytorch3d.git" #18

Closed T-bagwell closed 2 days ago

T-bagwell commented 5 days ago

install as readme.md

reproduce step:

git clone https://github.com/MyNiuuu/MOFA-Video.git
cd MOFA-Video/
cd MOFA-Video-Hybrid/
conda create -n mofa python==3.10
conda activate mofa
pip install -r requirements.txt

Get one warning as: WARNING: typer 0.12.3 does not provide the extra 'all'

continue next step:

pip install opencv-python-headless
pip install "git+https://github.com/facebookresearch/pytorch3d.git"

get error:


(mofa) lq@ubuntu:~/MOFA-Video/MOFA-Video-Hybrid$ pip install "git+https://github.com/facebookresearch/pytorch3d.git"
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting git+https://github.com/facebookresearch/pytorch3d.git
  Cloning https://github.com/facebookresearch/pytorch3d.git to /tmp/pip-req-build-jgh4go7x
  Running command git clone --filter=blob:none --quiet https://github.com/facebookresearch/pytorch3d.git /tmp/pip-req-build-jgh4go7x
  Resolved https://github.com/facebookresearch/pytorch3d.git to commit 89653419d0973396f3eff1a381ba09a07fffc2ed
  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 "/tmp/pip-req-build-jgh4go7x/setup.py", line 17, in <module>
          from torch.utils.cpp_extension import CppExtension, CUDA_HOME, CUDAExtension
        File "/home/lq/miniconda3/envs/mofa/lib/python3.10/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' (/home/lq/.local/lib/python3.10/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.
(mofa) lq@ubuntu:~/MOFA-Video/MOFA-Video-Hybrid$

try to use gitee:


(mofa) lq@ubuntu:~/MOFA-Video/MOFA-Video-Hybrid$ pip install "git+https://gitee.com/yimlu/pytorch3d.git@stable"
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting git+https://gitee.com/yimlu/pytorch3d.git@stable
  Cloning https://gitee.com/yimlu/pytorch3d.git (to revision stable) to /tmp/pip-req-build-qere_0o2
  Running command git clone --filter=blob:none --quiet https://gitee.com/yimlu/pytorch3d.git /tmp/pip-req-build-qere_0o2
  Running command git checkout -q 2f11ddc5ee7d6bd56f2fb6744a16776fab6536f7
  Resolved https://gitee.com/yimlu/pytorch3d.git to commit 2f11ddc5ee7d6bd56f2fb6744a16776fab6536f7
  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 "/tmp/pip-req-build-qere_0o2/setup.py", line 17, in <module>
          from torch.utils.cpp_extension import CppExtension, CUDA_HOME, CUDAExtension
        File "/home/lq/miniconda3/envs/mofa/lib/python3.10/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' (/home/lq/.local/lib/python3.10/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.
(mofa) lq@ubuntu:~/MOFA-Video/MOFA-Video-Hybrid$
MyNiuuu commented 5 days ago

What is your version of setuptools? After searching on the internet, I found that most similar errors are caused by setuptools package. Maybe you can try the following commands, which I found from other pages (a, b, c) that well solves the issue:

python -m pip install setuptools==69.5.1
T-bagwell commented 2 days ago

What is your version of setuptools? After searching on the internet, I found that most similar errors are caused by setuptools package. Maybe you can try the following commands, which I found from other pages (a, b, c) that well solves the issue:

python -m pip install setuptools==69.5.1

use this can fix the issue.