Можно ли по-прежнему использовать pipenv с Python 2.7? - PullRequest
0 голосов
/ 19 марта 2020

У меня на компьютере установлена ​​Python2 .7 & Python3 .8 с pipenv. Мне удалось создать проект 2.7, выполнив следующую команду:

pipenv --two install
pipenv shell
> python --version
> > Python 2.7.15

Но когда я попытался установить новую зависимость с помощью pipenv, я получил ошибку TLS из-за SNIMissingWarning:

pip install pylint
...
[pipenv.exceptions.InstallError]: ['Collecting astroid==1.6.6 (from -r C:\\Users\\aymeric\\AppData\\Local\\Temp\\pipenv-pktqf1dv-requirements\\pipenv-66rq3_4k-requirement.txt (line 1))', "  Could not fetch URL https://pypi.org/simple/astroid/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/astroid/ (Caused by SSLError(SSLError(1, '_ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)) - skipping"]
[pipenv.exceptions.InstallError]: ["DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. 
Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. 
More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support",  'c:\\users\\aymeric\\.virtualenvs\\firmware-pjqfwcnq\\lib\\site-packages\\ pip\\_vendor\\urllib3\\util\\ssl_.py:365: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server 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:\\users\\aymeric\\.virtualenvs\\firmware-pjqfwcnq\\lib\\site-packages\\pip\\_vendor\\urllib3\\util\\ssl_.py:149: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail.

Что странно, потому что SNIMissingWarning должен был быть исправлен в 2.7.9, как описано в по этой ссылке

Если удаленные репозитории теперь недоступны из 2.7 virtualenv, как вы можете это сделать? С уважением

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