加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

关于windows下 使用Anaconda3安装的python无法使用ssl模块问题.

发布时间:2020-12-14 02:00:14 所属栏目:Windows 来源:网络整理
导读:关联错误: 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 con

关联错误:
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,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,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,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,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:anaconda3libsite-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:ProgramDataAnaconda3libssl.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:Anaconda3Scripts;
C:Anaconda3Librarybin

大多数人只加了 C:Anaconda3;C:Anaconda3Scripts; 所以才导致这个问题.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读