首先進入網站https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/ 查看更改方法 如下:
或者使用下面命令
查看源:conda config --show-sources
換成清華源:conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
設置搜索時顯示通道地址:conda config --set show_channel_urls yes
輸入上面三條命令也可以。
然后進入pytorch官網:https://pytorch.org/ 找到自己要下載的版本
然后用conda install 命令即可使用清華源進行安裝如上圖命令。