1.在conda创建环境时如下报错:
-bash-4.2$ conda create -n myenv
Solving environment: done
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/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/cloud/conda-forge/noarch/repodata.json (Caused by SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'ssl3_get_server_certificate\', \'certificate verify failed\')])")))'))
2.解决方法,
先移除之前加入的镜像,代码如下:
#移除某一镜像源
conda config --remove channels 源名称或链接
#例如
移除某一镜像源
conda config --remove channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
再重新加镜像,但把镜像的https改成http,以其中一个镜像为例:
conda config --add channels http://mirrors.ustc.edu.cn/anaconda/pkgs/main/