Today wanted to experience under the latest version of pytorch1.01, and found conda install time HTTP error, and checked the original from April 25 domestic source of Tsinghua University, USTC source and other services gradually shut down, helpless and can only be restored to Anaconda official website of the original source, my heart pull pull cool cool, so only friends, the installation process on how to share the speed record. My GPU is Nvidia 2080ti, CUDA version 10.0, so I installed version CPU and GPU versions in different virtual environments.
1. Restore the official source
As the source of Tsinghua University and USTC source can not use, so first remove
conda config --remove-key channels
The original C: \ Users \ Administrator \ .condarc file under:
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- anaconda-fusion
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
show_channel_urls: true
ssl_verify: true
After deleting is:
show_channel_urls: true
ssl_verify: true
2. "find a way" to access pytorch official website pytorch.org, select the platform generates installation instructions
We can see from the official website, GPU version of the installation instructions:
conda install pytorch torchvision cudatoolkit=9.0 -c pytorch
CPU version of the installation instructions:
conda install pytorch-cpu torchvision-cpu -c pytorch
Note that this step is just to tell you command installation time with conda, actually not children's shoes "find a way" Shangguan network can also run this command directly loaded, but the matter can not see the official website, install pytorch are giant slow, use this command Conda just to get resolved automatically install dependent pytorch time, or install their own got a bit of trouble, proved that in addition to installing pytorch time out, the other very quickly, do not need to "find a way." Incidentally, when I installed the automated installation package as shown below:
3. Use the IDM Downloader directly download the installation package:
GPU version:
https://conda.anaconda.org/pytorch/win-64/pytorch-1.0.1-py3.6_cuda100_cudnn7_1.tar.bz2
CPU versions:
https://conda.anaconda.org/pytorch/win-64/pytorch-cpu-1.0.1-py3.6_cpu_1.tar.bz2
Download with IDM giant fast, otherwise giant slow
4. Clear the local cache download
As the third step conda local download fails, do not need to first complete the download cache cleared position in the anaconda / dpkg directory, not just the download is complete pytorch-1.0.1-py3.6_cuda100_cudnn7_1.tar.bz2 package and unzip the file delete folder together.
5. The third step is to install the downloaded installation package locally
conda install --use-local pytorch-1.0.1-py3.6_cuda100_cudnn7_1.tar.bz2
conda install --use-local pytorch-cpu-1.0.1-py3.6_cpu_1.tar.bz2
6. test OK
import torch
print(torch.__version__)
7. Attach pip package download, of course, this will need to be able to "find a way" out download
https://download.pytorch.org/whl/cpu/torch-1.0.1-cp36-cp36m-win_amd64.whl
Https://daunlodkpytorckorg/whl/chul00/torc-lk0k0-chp36-chp36m-vin_amd64kwhl # Chudl0k0
The above steps, the third and fourth five steps can be carried out directly, does not need to "find a way" out.