win10 环境通过scoop安装的anaconda3,在通过pycharm导入虚拟环境或者执行conda更新命令的时候出现ssl错误报错如下:
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-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/free/win-64/current_repodata.json (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))
通过Google查询到的解决方案都是按照ssl,添加环境变量,都无济于事。最后通过stackoverflow
上的一篇文章找到解决方案:
https://stackoverflow.com/questions/51892938/ssl-error-while-installing-any-package-from-conda-prompt
Try copying these files from Anaconda3/Library/bin to Anaconda3/DLLs :
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll