简体   繁体   English

Pycharm由于SSL无法安装软件包

[英]Pycharm failed installing packages because of SSL

I am using Windows 7 virtual machine and I can't add ctypes. 我正在使用Windows 7虚拟机,但是无法添加ctypes。 My physical machine runs Ubuntu and the internet connection is a WiFi-hotspot. 我的物理机运行Ubuntu,互联网连接是一个WiFi热点。

Error occured: 发生了错误:

Could not fetch URL https://pypi.org/simple/ctypes/ : There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/ctypes/ (Caused by SSLError(SSLError(1, '_ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)) - skipping 无法获取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警报协议版本')引起))-跳过

Command output: 命令输出:

Collecting ctypes Could not fetch URL https://pypi.org/simple/ctypes/ : There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/ctypes/ (Caused by SSLError(SSLError(1, '_ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)) - skipping 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(SSLError(1, '_ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)) - skipping 收集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

Try to upgrade your urllib security packages eg via pip. 尝试升级您的urllib安全软件包,例如通过pip。

pip install urllib3[secure]

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

Your urllib seems to try to access pypi with tlsv1. 您的urllib似乎尝试使用tlsv1访问pypi。 Very likely that they don't allow you to, anymore. 很可能他们不再允许您了。

Get your toolchain up to date and you should be fine. 更新您的工具链,您应该会很好。

update: 更新:

How to do stuff with pip on windows in different versions is already answered here: How do I install pip on Windows? 在这里已经回答了如何在不同版本的Windows上使用pip进行操作: 如何在Windows上安装pip?

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

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