繁体   English   中英

Pycharm由于SSL无法安装软件包

[英]Pycharm failed installing packages because of SSL

我正在使用Windows 7虚拟机,但是无法添加ctypes。 我的物理机运行Ubuntu,互联网连接是一个WiFi热点。

发生了错误:

无法获取URL https://pypi.org/simple/ctypes/ :确认ssl证书时出现问题:HTTPSConnectionPool(host ='pypi.org',port = 443):url:/ simple /超过了最大重试次数ctypes /(由SSLError(SSLError(1,'_ssl.c:499:错误:1407742E:SSL例程:SSL23_GET_SERVER_HELLO:tlsv1警报协议版本')引起))-跳过

命令输出:

收集ctypes无法获取URL https://pypi.org/simple/ctypes/ :确认ssl证书时出现问题:HTTPSConnectionPool(host ='pypi.org',port = 443):URL超过了最大重试次数:/ simple / ctypes /(由SSLError(SSLError(1,'_ssl.c:499:error:1407742E:SSL例程:SSL23_GET_SERVER_HELLO:tlsv1警报协议版本')引起)))-跳过无法获取URL https:// pypi。 org / simple / pip / :确认ssl证书时出现问题:HTTPSConnectionPool(host ='pypi.org',port = 443):URL超过最大重试次数:/ simple / pip /(由SSLError(SSLError(1 ,'_ssl.c:499:错误:1407742E:SSL例程:SSL23_GET_SERVER_HELLO:tlsv1警报协议版本'),))-跳过

C:\Python27\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_vendor\urllib3\util\ssl_.py:339: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  SNIMissingWarning
C:\Python27\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/ctypes/
C:\Python27\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/ctypes/
C:\Python27\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/ctypes/
C:\Python27\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/ctypes/
C:\Python27\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/ctypes/
C:\Python27\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
  Could not find a version that satisfies the requirement ctypes (from versions: )
No matching distribution found for ctypes
C:\Python27\lib\site-packages\pip-10.0.1-py2.7.egg\pip\_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning

尝试升级您的urllib安全软件包,例如通过pip。

pip install urllib3[secure]

这应该可以指导您: https : //urllib3.readthedocs.io/en/latest/user-guide.html#ssl-py2

您的urllib似乎尝试使用tlsv1访问pypi。 很可能他们不再允许您了。

更新您的工具链,您应该会很好。

更新:

在这里已经回答了如何在不同版本的Windows上使用pip进行操作: 如何在Windows上安装pip?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM