关于windows下 使用Anaconda3安装的python无法使用ssl模块问题.关联pip无法下载https
Posted loveskey
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了关于windows下 使用Anaconda3安装的python无法使用ssl模块问题.关联pip无法下载https相关的知识,希望对你有一定的参考价值。
关联错误:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. 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/pip/ 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.")‘: /simple/pip/ 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.")‘: /simple/pip/ Retrying (Retry(total=1, 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/pip/ Retrying (Retry(total=0, 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/pip/ Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org‘, port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can‘t connect to HTTPS URL because the SSL module is not available.")) - skipping Requirement already up-to-date: pip in d:\\anaconda3\\lib\\site-packages (18.1) pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org‘, port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can‘t connect to HTTPS URL because the SSL module is not available.")) - skipping
关联错误2:
>>> import ssl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\\ProgramData\\Anaconda3\\lib\\ssl.py", line 101, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: DLL load failed: The operating system cannot run %1.
原因:找不到libeay32.dll.因为没有把anacoda3 dll库目录加到path
中
想正常使用需要把类似以下路径加入PATH中
C:\\Anaconda3;
C:\\Anaconda3\\Scripts;
C:\\Anaconda3\\Library\\bin
大多数人只加了 C:\\Anaconda3;
和 C:\\Anaconda3\\Scripts;
所以才导致这个问题.
以上是关于关于windows下 使用Anaconda3安装的python无法使用ssl模块问题.关联pip无法下载https的主要内容,如果未能解决你的问题,请参考以下文章
Windows下同时安装Anaconda2与Anaconda3
Window10下安装Anaconda3-2019.10目录文件不完整
windows10+anaconda3+tensorflow(GPU)
Windows7 下 Anaconda3 的下载环境配置及清华源设置
Windows7安装Anaconda3后,conda不是内部或者外部命令
Windows10+Anaconda3下深度学习环境创建。安装tensorflow(cpu版),theano,keras