Pycharm не удалось установить пакеты из-за SSL - PullRequest
0 голосов
/ 18 декабря 2018

Я использую виртуальную машину 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', порт = 443): максимальное количество попыток превышено с помощью url: / simple / ctypes / (вызвано SSLError (SSLError (1, '_ssl.c: 499: ошибка: 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

1 Ответ

0 голосов
/ 18 декабря 2018

Попробуйте обновить пакеты безопасности urllib, например, через pip.

pip install urllib3[secure]

Это должно помочь вам: https://urllib3.readthedocs.io/en/latest/user-guide.html#ssl-py2

Кажется, ваш urllib пытается получить доступ к pypi с помощью tlsv1.Весьма вероятно, что они вам больше не позволяют.

Обновите ваш инструментарий, и с вами все будет в порядке.

обновление:

Как делать вещи с pip на окнах в разных версиях уже ответили здесь: Как мне установить pip на Windows?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...