Closed DanielTakeshi closed 1 year ago
I don't understand what is wrong with your attempt #1. Here's something similar which works for me today
conda create -n seuss python=3.8 -y
conda activate seuss
conda install pytorch==1.12.1 torchvision cudatoolkit=10.2 -c pytorch -c conda-forge -y
conda install -c fvcore -c iopath -c conda-forge fvcore iopath -y
conda install pytorch3d=0.7.4 -c pytorch3d -y
The resulting conda list is as follows, which may help you ask for more specific versions.
# Name Version Build Channel
_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
blas 1.0 mkl
brotlipy 0.7.0 py38h0a891b7_1004 conda-forge
bzip2 1.0.8 h7f98852_4 conda-forge
ca-certificates 2023.5.7 hbcca054_0 conda-forge
certifi 2023.5.7 py38h06a4308_0
cffi 1.15.0 py38h3931269_0 conda-forge
charset-normalizer 3.1.0 pyhd8ed1ab_0 conda-forge
colorama 0.4.6 pyhd8ed1ab_0 conda-forge
cryptography 3.4.8 py38h3e25421_1 conda-forge
cudatoolkit 10.2.89 h713d32c_10 conda-forge
ffmpeg 4.3 hf484d3e_0 pytorch
freetype 2.10.4 h0708190_1 conda-forge
fvcore 0.1.5.post20210915 py38 fvcore
giflib 5.2.1 h36c2ea0_2 conda-forge
gmp 6.2.1 h58526e2_0 conda-forge
gnutls 3.6.13 h85f3911_1 conda-forge
idna 3.4 pyhd8ed1ab_0 conda-forge
intel-openmp 2021.4.0 h06a4308_3561
iopath 0.1.9 py38 iopath
jpeg 9e h166bdaf_1 conda-forge
lame 3.100 h7f98852_1001 conda-forge
lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.38 h1181459_1
lerc 3.0 h295c915_0
libdeflate 1.17 h5eee18b_0
libffi 3.4.4 h6a678d5_0
libgcc-ng 11.2.0 h1234567_1
libgomp 11.2.0 h1234567_1
libiconv 1.17 h166bdaf_0 conda-forge
libpng 1.6.39 h5eee18b_0
libstdcxx-ng 11.2.0 h1234567_1
libtiff 4.5.0 h6a678d5_2
libwebp 1.2.4 h11a3e52_1
libwebp-base 1.2.4 h5eee18b_1
lz4-c 1.9.3 h9c3ff4c_1 conda-forge
mkl 2021.4.0 h06a4308_640
mkl-service 2.4.0 py38h95df7f1_0 conda-forge
mkl_fft 1.3.1 py38hd3c417c_0
mkl_random 1.2.2 py38h1abd341_0 conda-forge
ncurses 6.4 h6a678d5_0
nettle 3.6 he412f7d_0 conda-forge
numpy 1.24.3 py38h14f4228_0
numpy-base 1.24.3 py38h31eccc5_0
openh264 2.1.1 h4ff587b_0
openssl 1.1.1t h7f8727e_0
pillow 9.4.0 py38h6a678d5_0
pip 23.0.1 py38h06a4308_0
portalocker 2.7.0 py38h578d9bd_0 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pyopenssl 20.0.1 pyhd8ed1ab_0 conda-forge
pysocks 1.7.1 pyha2e5f31_6 conda-forge
python 3.8.16 h7a1cb2a_3
python_abi 3.8 2_cp38 conda-forge
pytorch 1.12.1 py3.8_cuda10.2_cudnn7.6.5_0 pytorch
pytorch-mutex 1.0 cuda pytorch
pytorch3d 0.7.4 py38_cu102_pyt1121 pytorch3d
pyyaml 6.0 py38h0a891b7_4 conda-forge
readline 8.2 h5eee18b_0
requests 2.29.0 pyhd8ed1ab_0 conda-forge
setuptools 66.0.0 py38h06a4308_0
six 1.16.0 pyh6c4a22f_0 conda-forge
sqlite 3.41.2 h5eee18b_0
tabulate 0.9.0 pyhd8ed1ab_1 conda-forge
termcolor 2.3.0 pyhd8ed1ab_0 conda-forge
tk 8.6.12 h1ccaba5_0
torchvision 0.13.1 py38_cu102 pytorch
tqdm 4.65.0 pyhd8ed1ab_1 conda-forge
typing_extensions 4.5.0 pyha770c72_0 conda-forge
urllib3 1.26.15 pyhd8ed1ab_0 conda-forge
wheel 0.38.4 py38h06a4308_0
xz 5.4.2 h5eee18b_0
yacs 0.1.8 pyhd8ed1ab_0 conda-forge
yaml 0.2.5 h7f98852_2 conda-forge
zlib 1.2.13 h5eee18b_0
zstd 1.5.2 ha4553b6_0
Thanks @bottler and I apologize for my delayed response in following up on this. I investigated more and found some interesting things about installing (pytorch 1.12.1 seems OK but 2.0.1 seems to be giving some errors):
I tried this again which is my first attempt in my original post:
conda create --name seuss python=3.8 -y && conda activate seuss
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=10.2 -c pytorch -y
conda install -c fvcore -c iopath -c conda-forge fvcore iopath -y
conda install pytorch3d -c pytorch3d -y
Unfortunately it still did not work on the Ubuntu 18.04 machine I'm testing.
But when I delete the seuss
env and then try your commands:
conda create -n seuss python=3.8 -y && conda activate seuss
conda install pytorch==1.12.1 torchvision cudatoolkit=10.2 -c pytorch -c conda-forge -y
conda install -c fvcore -c iopath -c conda-forge fvcore iopath -y
conda install pytorch3d=0.7.4 -c pytorch3d -y
Suddenly the last command will finish correctly and not complain about conflicts. Here's the paste bin which shows my sequence of commands: https://pastebin.com/raw/dYYgXNDR This starts from my removal of the old conda environment that failed and then I ran your commands.
The only differences are:
torchvision
package whereas I am (but your conda list
shows it's the same version I specified...) and you did not install torchaudio
and you are also specifying conda-forge
. I didn't put conda-forge
in my command because the installation for pytorch with cudatoolkit=10.2
did not specify that https://pytorch.org/get-started/previous-versions/ pytorch3d
but that's already the latest version on PyPI. https://pypi.org/project/pytorch3d/Would any of these cause issues that you are aware of?
But will this also work for the newer version of PyTorch? The installation said that it supports PyTorch 2.0.1. I try the sequence of commands:
conda create -n seuss python=3.8 -y && conda activate seuss
conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
conda install -c fvcore -c iopath -c conda-forge fvcore iopath -y
conda install pytorch3d=0.7.4 -c pytorch3d -y
I am running into package conflicts. When you run the last installation, do you run into the same issue?
Also tried other PyTorch versions and it is giving similar errors.
PyTorch 2.0:
conda create -n seuss python=3.8 -y && conda activate seuss
conda install pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 pytorch-cuda=11.7 -c pytorch -c nvidia -y
conda install -c fvcore -c iopath -c conda-forge fvcore iopath -y
conda install pytorch3d=0.7.4 -c pytorch3d -y
PyTorch 1.13:
conda create -n seuss python=3.8 -y && conda activate seuss
conda install pytorch=1.13.0 torchvision pytorch-cuda=11.6 -c pytorch -c nvidia -y
conda install -c fvcore -c iopath -c conda-forge fvcore iopath -y
conda install pytorch3d=0.7.4 -c pytorch3d -y
Both sets of the above commands result in conflicts when I try and install the pytorch3d
command.
Thanks again for checking this.
torchvision and torchaudio probably won't matter. If pytorch installs without conda-forge that's ok too: it doesn't for some sets of versions. Note newer instructions replace cudatoolkit with pytorch-cuda, adding -c nvidia
. That might be needed for older versions now as well.
For the second part, exactly the right build https://anaconda.org/pytorch3d/pytorch3d/0.7.4/download/linux-64/pytorch3d-0.7.4-py38_cu117_pyt201.tar.bz2 is available. Maybe you could download it directly and conda install the file?
Thanks @bottler I realized that the code I needed in pytorch3d
can be "ripped out" of the code base as it only relies on pure pytorch functions, so I gave up figuring out how to install the full conda package and just copied the methods in pytorch3d
that I needed.
The Problem
I am running into problems with installing PyTorch3D. I am looking at the instructions:
https://github.com/facebookresearch/pytorch3d/blob/main/INSTALL.md
Due to my existing code restrictions, I have to use Python 3.8 but that should be supported. In addition, I am using
cudatoolkit=10.2
for my pytorch installations which is again a function of the machines that I am using. I am trying different pytorch versions, downgrading to 1.10 (as shown in my minimum working examples). Unfortunately when I installpytorch3d
I am running into the dreaded "Found conflicts" error. This has been reported before:torchvision
version but I have one that's reasonably up to date. This also shows an example from a maintainer of usingcudatoolkit=10.2
but with python 3.9.pytorch
version but I specify the version in my command.pytorch3d
that got updated later.conda list
whereas I have stuff in there as I show later.See below in my Minimum Working Examples for an example output of this error.
Minimum Working Examples
Here are a set of minimum working examples. They are modeled after the one in this post.
To clarify, I tried each of these MWEs one by one in sequence. They all resulted in the same error at the end. After I tried each attempt, I removed the conda env with
conda env remove -n seuss
and then did the next attempt. All are done on an Ubuntu 18.04 machine.Attempt 1
Attempt 2 (downgrade torch to 1.12):
Attempt 3 (downgrade torch to 1.11):
Attempt 4 (downgrade torch to 1.10):
Here is an example output from the 4th attempt with the error message: https://pastebin.com/raw/DK6deHam (it was too long to paste into GitHub).
Other Information
After the 4th attempt above, I tried doing
conda list
and checking to see if I can use torch:I do not notice anything wrong here.
Here is
conda info
:Thus, I am unsure what to do now other than to keep trying different combinations. Is there a compatibility matrix of versions of python, torch, cudatoolkit, and pytorch3d, ideally ones that work with Python 3.8?
For Reference, Python 3.7
Using Python 3.7, and an older pytorch3d version, this will NOT run into an installation error:
I am wondering if there is something related to recent versions of pytorch3d that might result in incompatibilities?