Anaconda 安装包的时候,总是出现如下的错误:
Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pyperclip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /simple/pyperclip/ (Caused by SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:852)'),)) - skipping
这样的错误,很有可能是在删除镜像源的时候,把默认的镜像源也删除了。
找了很多的方法,都不管用,基本都是让添加信任下载的网址这样的操作,是可以解决这个问题,但是每次这样操作的话很麻烦。
重新添加一下 Ananconda 默认的镜像源,这样可以一次性解决这个问题!
conda config --add channels https://repo.anaconda.com/pkgs/main
conda config --add channels https://repo.anaconda.com/pkgs/r
conda config --add channels https://repo.anaconda.com/pkgs/msys2
conda config --set show_channel_urls yes
之后就可以正常使用 pip instill xx 了,如下图: