问题描述
Anaconda 虚拟环境中的 python pip 安装依赖时报错:
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”)’: /pypi/simple/flask-bcrypt/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”)’: /pypi/simple/flask-bcrypt/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”)’: /pypi/simple/flask-bcrypt/
ERROR: Operation cancelled by user
解决方案
将以下文件从 复制C:\Users\user\Miniconda3\Library\bin到C:\Users\user\Miniconda3\DLLs:(user取决于你的用户名)
libcrypto-1_1-x64.dll
libcrypto-1_1-x64.pdb
libssl-1_1-x64.dll
libssl-1_1-x64.pdb