Skip to content

Conflicts during conda installation with Python 3.8, cudatoolkit=10.2, Ubuntu 18.04 (minimum working examples provided) #1538

@DanielTakeshi

Description

@DanielTakeshi

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 install pytorch3d I am running into the dreaded "Found conflicts" error. This has been reported before:

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

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

Attempt 2 (downgrade torch to 1.12):

conda create --name seuss python=3.8 -y && conda activate seuss
conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=10.2 -c pytorch -y
conda install -c fvcore -c iopath -c conda-forge fvcore iopath -y
conda install pytorch3d -c pytorch3d -y

Attempt 3 (downgrade torch to 1.11):

conda create --name seuss python=3.8 -y && conda activate seuss
conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=10.2 -c pytorch -y
conda install -c fvcore -c iopath -c conda-forge fvcore iopath -y
conda install pytorch3d -c pytorch3d -y

Attempt 4 (downgrade torch to 1.10):

conda create --name seuss python=3.8 -y && conda activate seuss
conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=10.2 -c pytorch -y
conda install -c fvcore -c iopath -c conda-forge fvcore iopath -y
conda install pytorch3d -c pytorch3d -y

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:

(seuss) seita@marvin:~ $ conda list
# packages in environment at /home/seita/miniconda3/envs/seuss:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_openmp_mutex             5.1                       1_gnu  
blas                      1.0                         mkl  
bzip2                     1.0.8                h7b6447c_0  
ca-certificates           2023.5.7             hbcca054_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
cudatoolkit               10.2.89              hfd86e86_1  
ffmpeg                    4.3                  hf484d3e_0    pytorch
freetype                  2.12.1               h4a9f257_0  
fvcore                    0.1.5.post20210915            py38    fvcore
giflib                    5.2.1                h5eee18b_3  
gmp                       6.2.1                h295c915_3  
gnutls                    3.6.15               he1e5248_0  
intel-openmp              2023.1.0         hdb19cb5_46305  
iopath                    0.1.9                      py38    iopath
jpeg                      9e                   h5eee18b_1  
lame                      3.100                h7b6447c_0  
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.16                 h7f8727e_2  
libidn2                   2.3.2                h7f8727e_0  
libpng                    1.6.39               h5eee18b_0  
libstdcxx-ng              11.2.0               h1234567_1  
libtasn1                  4.19.0               h5eee18b_0  
libtiff                   4.5.0                h6a678d5_2  
libunistring              0.9.10               h27cfd23_0  
libuv                     1.44.2               h5eee18b_0  
libwebp                   1.2.4                h11a3e52_1  
libwebp-base              1.2.4                h5eee18b_1  
lz4-c                     1.9.4                h6a678d5_0  
mkl                       2023.1.0         h6d00ec8_46342  
mkl-service               2.4.0            py38h5eee18b_1  
mkl_fft                   1.3.6            py38h417a72b_1  
mkl_random                1.2.2            py38h417a72b_1  
ncurses                   6.4                  h6a678d5_0  
nettle                    3.7.3                hbbd107a_1  
numpy                     1.24.3           py38hf6e8229_1  
numpy-base                1.24.3           py38h060ed82_1  
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               1.4.0                      py_0    conda-forge
python                    3.8.16               h7a1cb2a_3  
pytorch                   1.10.0          py3.8_cuda10.2_cudnn7.6.5_0    pytorch
pytorch-mutex             1.0                        cuda    pytorch
pyyaml                    5.1.2            py38h516909a_1    conda-forge
readline                  8.2                  h5eee18b_0  
setuptools                66.0.0           py38h06a4308_0  
sqlite                    3.41.2               h5eee18b_0  
tabulate                  0.9.0              pyhd8ed1ab_1    conda-forge
tbb                       2021.8.0             hdb19cb5_0  
termcolor                 2.3.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h1ccaba5_0  
torchaudio                0.10.0               py38_cu102    pytorch
torchvision               0.11.0               py38_cu102    pytorch
tqdm                      4.65.0             pyhd8ed1ab_1    conda-forge
typing_extensions         4.5.0            py38h06a4308_0  
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.5                hc292b87_0  
(seuss) seita@marvin:~ $ python
Python 3.8.16 (default, Mar  2 2023, 03:21:46) 
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'1.10.0'
>>> exit()
(seuss) seita@marvin:~ $ 

I do not notice anything wrong here.

Here is conda info:

(seuss) seita@marvin:~ $ conda info

     active environment : seuss
    active env location : /home/seita/miniconda3/envs/seuss
            shell level : 1
       user config file : /home/seita/.condarc
 populated config files : /home/seita/.condarc
          conda version : 4.13.0
    conda-build version : not installed
         python version : 3.9.5.final.0
       virtual packages : __cuda=12.0=0
                          __linux=4.15.0=0
                          __glibc=2.27=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/seita/miniconda3  (writable)
      conda av data dir : /home/seita/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/seita/miniconda3/pkgs
                          /home/seita/.conda/pkgs
       envs directories : /home/seita/miniconda3/envs
                          /home/seita/.conda/envs
               platform : linux-64
             user-agent : conda/4.13.0 requests/2.29.0 CPython/3.9.5 Linux/4.15.0-208-generic ubuntu/18.04.6 glibc/2.27
                UID:GID : 1002:1002
             netrc file : /home/seita/.netrc
           offline mode : False

(seuss) seita@marvin:~ $ 

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:

conda create --name seuss python=3.7 -y && conda activate seuss
conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 cudatoolkit=10.2 -c pytorch -y
conda install -c fvcore -c iopath -c conda-forge fvcore iopath -y
conda install -c pytorch3d 'pytorch3d<=0.7.1' -y

I am wondering if there is something related to recent versions of pytorch3d that might result in incompatibilities?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions