简体   繁体   中英

Install older version of pytorch with GPU support using conda

I would like to install pytorch 1.11 using conda with gpu support for a specific cuda version, eg 11.6 .

One can do the following to install latest version:

conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia

And HERE says how to do it for older version of pytorch but no gpu support:

conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 -c pytorch

So, then does the following install a pytorch 1.11 with gpu support using conda?

conda install pytorch==1.11.0 torchvision==0.12.0 pytorch-cuda=11.6 -c pytorch -c nvidia

The pytorch-cuda package is a new metapackage only introduced three weeks ago - it is not pertinent to any thing but the latest PyTorch builds. Instead, for older packages you directly specify the cudatoolkit version for the environment.

Please note that pytorch=1.11 only supports CUDA versions 10.2 and 11.1-11.5. There are no builds that work with 11.6. See Anaconda Cloud .

Example: CUDA 11.5

conda install pytorch=1.11.0 torchvision=0.12 torchaudio=0.11 cudatoolkit=11.5 -c pytorch -c conda-forge

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