conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ conda config --set show_channel_urls yes#下载时显示文件来源
pytorch官网 的命令是 conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
然而,最后的-c pytorch参数一定不要用,它的意思是强制在pytorch官网下载。
conda install pytorch torchvision cudatoolkit=10.1
https://blog.csdn.net/qq_29562611/article/details/102398227
conda create -n tensorflow python=3.5
conda create -n tensorflow python=3.5 Fetching package metadata .......
#首先先添加清华的镜像源 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/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --set show_channel_urls yes #如果无法解决,则删除channels配置文件中部分内容 #具体操作如下: #1、快速创建channels配置文件的备份(保险起见) cp ~/.condarc{,.bak} #查看配置文件的内容 cat ~/.condarc.bak channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ - https://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud - defaults - https://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda - https://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/conda - bioconda - r - conda-forge show_channel_urls: true #2、删除部分内容 ## 主要是删除此行: - defaults #修改后配置文件的内容如下: vim ~/.condarc channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ show_channel_urls: true