Anaconda未安装SSL功能报错
在Windows10系统下安装Anaconda之后,在Anaconda Promt安装keras安装失败,报错如下:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting xxx
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.”)’: /simple/xxx/
…
Could not fetch URL https://pypi.org/simple/xxx/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url: /simple/ssl/ (Caused by SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”)) - skipping
Could not find a version that satisfies the requirement xxx(from versions: )
No matching distribution found for xxx
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
解决方案:
环境变量配置有问题,在系统变量的path路径下添加Anaconda3的安装路径:
E:\Anaconda3
E:\Anaconda3\Scripts
E:\Anaconda3\Library\bin