按照官方给出的命令安装pytorch,
报错信息如下:
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/pytorch/linux-64/pytorch-1.1.0-py3.6_cuda10.0.130_cudnn7.5.1_0.tar.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
总之就是添加镜像:
首先添加了以下镜像:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
然而并没有用,忘记截图了,总之可以看到pytorch的来源依然是default
继续添加镜像,总之起作用的好像是第三个吧!history了一下都不见了hhh,以后一定要先截图hhh
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
这个时候,再输入官网命令,我安装的是1.1.0版本,顺利安装完成!撒花O(∩_∩)O~~
conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=10.0 pytorch