conda安裝太慢問題解決


問題描述:在使用conda下載軟件等東西的時候,通常會因為下載源的或者網絡的原因使得下載超時,而無法下載的情況(下載報錯:Conda-Downloaded bytes did not match Content-Length)

方法一:設置下載源

先添加清華源:
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/conda-forge/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro/

再然后再運行安裝命令
conda install 包 即可

方法二:下載其需要的軟件,采用conda本地安裝

例如:
下載:cudatoolkit-10.1.243-h74a9793_0.tar.bz2
進入網站:https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/
然后按Ctrl+F鍵搜索文件名,點擊下載

下載:pytorch-1.6.0-py3.6_cuda101_cudnn7_0.tar.bz2
進入網站:https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64/
然后按Ctrl+F鍵搜索文件名,點擊下載

解釋網站查找:我是使用conda install 安裝pytorch的過程中有你所需要的軟件網址,我直接復制搜索下載的

接下來將下載好的軟件放到anaconda存放包的目錄下,如:~/anaconda3/pkgs/

這個目錄下。然后執行命令:

conda install --use-local 軟件名

參考博客:https://blog.csdn.net/feifei3211/article/details/80361227
https://www.cnblogs.com/ZeroTensor/p/11137723.html
https://blog.csdn.net/zhouzhiyao960211/article/details/102873717
https://blog.csdn.net/zzq060143/article/details/88042075


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM