使用清华镜像安装pytorch失败的解决方法
生活随笔
收集整理的這篇文章主要介紹了
使用清华镜像安装pytorch失败的解决方法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
首先添加清華鏡像至Anaconda倉庫:
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 --set show_channel_urls yes添加Pytorch鏡像:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/# for legacy win-64 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/peterjc123/在https://pytorch.org/get-started/locally/選擇所需的pytorch版本:
?如果直接運行
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch可能會因為網絡安裝失敗,因為-c pytorch參數指定了conda獲取pytorch的channel,在此指定為conda自帶的pytorch倉庫。
因此,只需要將-c pytorch語句去掉,就可以使用清華鏡像源快速安裝pytorch了。
參考https://blog.csdn.net/WannaSeaU/article/details/88427010
總結
以上是生活随笔為你收集整理的使用清华镜像安装pytorch失败的解决方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 内存管理之段错误
- 下一篇: 如何查看图片的长和宽(尺寸)