Cannot find conflict in Conda UnsatisfiableError message
Trying to install pytorch in conda in Docker, and get UnsatisfiableError. However, I cannot find any actual conflict in the error message or I may not understand it correctly. The Docker image used is nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04. There will be no problem if I do not specify the pytorch version to install. But I do need this version of pytorch for some legacy code.

Here is the conda command and error message.

(Python3.6) root@0cb9aad73116:/# conda install -c pytorch pytorch=0.3.1
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:



Package libgcc-ng conflicts for:
python==3.6.9 -&gt; libgcc-ng[version='&gt;=7.3.0']
zlib -&gt; libgcc-ng[version='&gt;=7.2.0|&gt;=7.3.0']
tk -&gt; libgcc-ng[version='&gt;=7.2.0|&gt;=7.3.0']
xz -&gt; libgcc-ng[version='&gt;=7.2.0']
pytorch=0.3.1 -&gt; libgcc-ng[version='&gt;=5.4.0']
libedit -&gt; libgcc-ng[version='&gt;=7.2.0|&gt;=7.3.0']
libffi -&gt; libgcc-ng[version='&gt;=7.2.0']
ncurses -&gt; libgcc-ng[version='&gt;=7.2.0|&gt;=7.3.0']
sqlite -&gt; libgcc-ng[version='&gt;=7.2.0|&gt;=7.3.0']
readline -&gt; libgcc-ng[version='&gt;=7.2.0|&gt;=7.3.0']
openssl -&gt; libgcc-ng[version='&gt;=7.2.0|&gt;=7.3.0']
Package libstdcxx-ng conflicts for:
ncurses -&gt; libstdcxx-ng[version='&gt;=7.2.0|&gt;=7.3.0']
pytorch=0.3.1 -&gt; libstdcxx-ng[version='&gt;=5.4.0']
python==3.6.9 -&gt; libstdcxx-ng[version='&gt;=7.3.0']
libffi -&gt; libstdcxx-ng[version='&gt;=7.2.0']
Package xz conflicts for:
python==3.6.9 -&gt; xz[version='&gt;=5.2.4,&lt;6.0a0']
Package cudnn conflicts for:
pytorch=0.3.1 -&gt; cudnn[version='7.0.*|&gt;=7.0.5,&lt;=8.0a0']
Package nccl conflicts for:
pytorch=0.3.1 -&gt; nccl[version='&lt;2']
Package setuptools conflicts for:
wheel -&gt; setuptools
pip -&gt; setuptools
Package zlib conflicts for:
tk -&gt; zlib[version='&gt;=1.2.11,&lt;1.3.0a0']
python==3.6.9 -&gt; zlib[version='&gt;=1.2.11,&lt;1.3.0a0']
Package ca-certificates conflicts for:
openssl -&gt; ca-certificates
Package libffi conflicts for:
python==3.6.9 -&gt; libffi[version='&gt;=3.2.1,&lt;4.0a0']
Package cudatoolkit conflicts for:
pytorch=0.3.1 -&gt; cudatoolkit[version='8.*|8.0.*']
Package _libgcc_mutex conflicts for:
libgcc-ng -&gt; _libgcc_mutex=[build=main]
Package numpy conflicts for:
pytorch=0.3.1 -&gt; numpy[version='&gt;=1.11|&gt;=1.11.3,&lt;2.0a0']
Package openssl conflicts for:
python==3.6.9 -&gt; openssl[version='&gt;=1.1.1c,&lt;1.1.2a']
Package libedit conflicts for:
sqlite -&gt; libedit[version='&gt;=3.1.20170329,&lt;3.2.0a0|&gt;=3.1.20181209,&lt;3.2.0a0']
Package ncurses conflicts for:
python==3.6.9 -&gt; ncurses[version='&gt;=6.1,&lt;7.0a0']
readline -&gt; ncurses[version='6.0.*|&gt;=6.0,&lt;7.0a0|&gt;=6.1,&lt;7.0a0']
libedit -&gt; ncurses[version='6.0.*|&gt;=6.1,&lt;7.0a0']
Package cffi conflicts for:
pytorch=0.3.1 -&gt; cffi
Package sqlite conflicts for:
python==3.6.9 -&gt; sqlite[version='&gt;=3.29.0,&lt;4.0a0']
Package * conflicts for:
pytorch=0.3.1 -&gt; *[track_features=cuda90]
Package tk conflicts for:
python==3.6.9 -&gt; tk[version='&gt;=8.6.8,&lt;8.7.0a0']
Package wheel conflicts for:
pip -&gt; wheel
Package certifi conflicts for:
setuptools -&gt; certifi[version='&gt;=2016.09|&gt;=2016.9.26']
Package mkl conflicts for:
pytorch=0.3.1 -&gt; mkl[version='&gt;=2018|&gt;=2018.0.2,&lt;2019.0a0']
Package readline conflicts for:
python==3.6.9 -&gt; readline[version='&gt;=7.0,&lt;8.0a0']
Package pip conflicts for:
python==3.6.9 -&gt; pip


Packages installed

(Python3.6) root@0cb9aad73116:/# conda list
# packages in environment at /opt/conda/envs/Python3.6:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main
ca-certificates           2019.11.27                    0
certifi                   2019.11.28               py36_0
libedit                   3.1.20181209         hc058e9b_0
libffi                    3.2.1                hd88cf55_4
libgcc-ng                 9.1.0                hdf63c60_0
libstdcxx-ng              9.1.0                hdf63c60_0
ncurses                   6.1                  he6710b0_1
openssl                   1.1.1d               h7b6447c_3
pip                       19.3.1                   py36_0
python                    3.6.9                h265db76_0
readline                  7.0                  h7b6447c_5
setuptools                42.0.2                   py36_0
sqlite                    3.30.1               h7b6447c_0
tk                        8.6.8                hbc83047_0
wheel                     0.33.6                   py36_0
xz                        5.2.4                h14c3975_4
zlib                      1.2.11               h7b6447c_3


Similar error remains if use Docker image continuumio/miniconda3:4.7.12.

docker run -it nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04 bash
apt-get update
apt install wget -y
wget https://repo.continuum.io/archive/Anaconda3-4.3.0-Linux-x86_64.sh 
bash Anaconda3-4.3.0-Linux-x86_64.sh
[Enter]
yes
[Enter]
yes
. /root/.bashrc
conda install mkl
y
conda install -c pytorch pytorch=0.3.1
y
conda list|grep pytorch


pytorch                   0.3.1           py36_cuda8.0.61_cudnn7.1.2_3    pytorch


root@dacfe958940b:/# bash
(base) root@dacfe958940b:/# python
Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 13 2017, 12:02:49) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
 import torch 
 print(torch.__version__)
0.3.1.post3

