win10 installation Pytorch [the latest version]

Since April 16, 2019 and 25, respectively, announced the cessation of Tsinghua University and USTC Anaconda mirroring services, from May 2019 to begin the installation Pytorch will appear some mistakes:

CondaHTTPError: HTTP 404 NOT FOUND for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch/repodata.json

Since conda source before I Tsinghua source, so there need to use the following command to delete the source Tsinghua University, turned into after the source:

conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.sjtug.sjtu.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.sjtug.sjtu.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.sjtug.sjtu.edu.cn/anaconda/cloud/conda-forge/

After you run the command to install Pytorch, my computer is win10 + Python3.6 + CUDA9.1.85:

conda install pytorch torchvision cudatoolkit=9.0 -c pytorch

For installation purposes torchvision torchvision mainly it integrates a number of data sets, and a number of learning models depth conversion, the package consists of three sub-packets torchvision components, namely: torchvision.datasets, torchvision.models, torchvision.transforms.

The last successful installation screenshot:

Test the installation, torch did not import error, and torch.cuda.is_available () is True, says support for GPU:

 

Guess you like

Origin www.cnblogs.com/lijinze-tsinghua/p/10973241.html