下載失敗
conda install xxx
出現如下報錯:
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/win-64/xxxxx.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/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
解決方法二
如果清華大學鏡像源里面沒有這個庫,那么還是會從原來的鏡像https://repo.anaconda.com/pkgs/main/
里面下載。
這里解決方法是使用迅雷
等其他下載器將.tar.bz2
下載到本地,執行本地安裝:
conda install --use-local xxxx.tar.bz2
如果出現錯誤:
CondaVerificationError
....
specified in the package manifest cannot be found.
需要清理之前的緩存:
conda clean --packages --tarballs
然后再重新執行本地安裝