本文内容为在Anaconda安装及使用时遇到的问题,具体下载、安装、环境配置、换源和.condarc文件处理网上有方案,在此不多赘述。
换源后报错CondaHTTPError: HTTP 000 CONNECTION FAILED解决方案
问题描述
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/current_repodata.json>
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.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'mirrors.tuna.tsinghua.edu.cn\', port=443): Max retries exceeded with url: /anaconda/pkgs/main/linux-64/current_repodata.json (Caused by SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'tls_process_server_certificate\', \'certificate verify failed\')])")))'))解决方案
关闭conda的ssl验证即可,在Anaconda Prompt中输入命令
conda config --set ssl_verify falseConda-Downloaded bytes did not match Content-Length问题解决方案
问题描述
CondaError: Downloaded bytes did not match Content-Length
url: https://repo.anaconda.com/pkgs/main/linux-64/cudnn-7.0.5-cuda8.0_0.tar.bz2
target_path: /home/yyf/miniconda3/pkgs/cudnn-7.0.5-cuda8.0_0.tar.bz2
Content-Length: 261398285
downloaded bytes: 47463195解决方案
一共有三个方案,灵活使用
1. 再次换源
2. 调高conda下载的timeout,再进行尝试,时长不够可以设置大点.
在Anaconda Prompt中输入命令
conda config --set remote_read_timeout_secs 600.03. 从conda的源下载好要安装的包,直接采用本地安装的方式。 下载地址
在Anaconda Prompt中输入命令
conda install --offline ./包名