简体   繁体   中英

How to build a conda environment with pytorch=0.3.1, since I keep getting conflicts

I need to get an environment working with the following requirements, but it just won't do. I have tried many things and always end up with something like below. Does anyone know how I can get an environment with the things that I need?

conda create -n myenv python=3.5 pytorch=0.3.1
Collecting package metadata (repodata.json): done
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 libffi conflicts for:
python=3.5 -> libffi[version='3.2.*|>=3.2.1,<4.0a0']
Package numpy conflicts for:
pytorch=0.3.1 -> numpy[version='>=1.11.3,<2.0a0']
Package openssl conflicts for:
python=3.5 -> openssl[version='1.0.*|1.0.*,>=1.0.2l,<1.0.3a|>=1.0.2m,<1.0.3a|>=1.0.2n,<1.0.3a|>=1.0.2o,<1.0.3a|>=1.0.2p,<1.0.3a']
Package libstdcxx-ng conflicts for:
pytorch=0.3.1 -> libstdcxx-ng[version='>=5.4.0']
python=3.5 -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
Package nccl conflicts for:
pytorch=0.3.1 -> nccl[version='<2']
Package libgcc-ng conflicts for:
pytorch=0.3.1 -> libgcc-ng[version='>=5.4.0']
python=3.5 -> libgcc-ng[version='>=7.2.0|>=7.3.0']
Package readline conflicts for:
python=3.5 -> readline[version='7.*|>=7.0,<8.0a0']
Package cudatoolkit conflicts for:
pytorch=0.3.1 -> cudatoolkit=8.0
Package cudnn conflicts for:
pytorch=0.3.1 -> cudnn[version='>=7.0.5,<=8.0a0']
Package cffi conflicts for:
pytorch=0.3.1 -> cffi
Package tk conflicts for:
python=3.5 -> tk[version='8.6.*|>=8.6.7,<8.7.0a0']
Package xz conflicts for:
python=3.5 -> xz[version='>=5.2.3,<6.0a0|>=5.2.4,<6.0a0']
Package zlib conflicts for:
python=3.5 -> zlib[version='>=1.2.11,<1.3.0a0']
Package python conflicts for:
pytorch=0.3.1 -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0']
Package sqlite conflicts for:
python=3.5 -> sqlite[version='>=3.20.1,<4.0a0|>=3.22.0,<4.0a0|>=3.23.1,<4.0a0|>=3.24.0,<4.0a0']
Package pip conflicts for:
python=3.5 -> pip
Package mkl conflicts for:
pytorch=0.3.1 -> mkl[version='>=2018.0.2,<2019.0a0']
Package ncurses conflicts for:
python=3.5 -> ncurses[version='6.0.*|>=6.0,<7.0a0|>=6.1,<7.0a0']

I'm afraid you need to reinstall your dependencies firstly which should be corresponding to pytorch version with 0.3.1 in your vitual environment. First step, install python-3.5, and then each dependency with specified version, and finally pytorch-0.3.1.

You would first fire up a conda environment like so:

conda create -n myenv python=3.6

You can then specify a specific pytorch version like so:

conda install pytorch=0.4.1 cuda75 -c pytorch

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM