DECA icon indicating copy to clipboard operation
DECA copied to clipboard

An important hint on Pytorch3D installation

Open HOMGH opened this issue 3 years ago • 4 comments
trafficstars

After getting tons of error for installing Pytorch3d, here is what worked for me:

You need to install PyTorch3D from source. So from [INSTALL.md], follow the steps:

  • conda install -c pytorch pytorch=1.9.1 torchvision cudatoolkit=10.2
  • conda install -c fvcore -c iopath -c conda-forge fvcore iopath
  • conda install -c bottler nvidiacub and finally:
  • conda install pytorch3d -c pytorch3d and it's done!

HOMGH avatar Jul 24 '22 15:07 HOMGH

It also works for me, thanks for your sharing!

icech avatar Aug 02 '22 03:08 icech

Thanks bro! This is incredibly helpful and time saving. Thanks for sharing! Tip for Nvidia 3000 series users, replace conda install -c pytorch pytorch=1.9.1 torchvision cudatoolkit=10.2 with pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 -f https://download.pytorch.org/whl/torch_stable.html

Also if given conda errors of pytorch3d not found

In x64 Native Tools Command Prompt for VS 2019:
set DISTUTILS_USE_SDK=1

pip install "git+https://github.com/facebookresearch/pytorch3d.git"

davidvfx07 avatar Sep 01 '22 22:09 davidvfx07

Thank you!!! Save my life!

hengfei-wang avatar Dec 03 '22 19:12 hengfei-wang

I found another problem. I can install pytorch3d using the above method. But after installing pytorch3d and kornia module, I got the error showed in https://github.com/YadiraF/DECA/issues/159. I tried many times and found the problem occurs when I install pytorch3d and kornia together.

After many tries, I solved the problem following the steps.

  1. pip install pytorch3d (get related modules for pytorch3d, this version of pytorch3d is too old, will update in last step)
  2. pip install -r requirements.txt (should add importlib-metadata?)
  3. pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' (update pytorch3d version to the lastest)
  4. run demo successfully

hengfei-wang avatar Dec 04 '22 23:12 hengfei-wang