пип 18.1 внутри virtualenv дает ошибку TSL / SSL - PullRequest
0 голосов
/ 01 ноября 2018

Я использую MacOS Mojave и установил Python 3.6.7 (vanilla, CPython) с pyenv. После этого я обновил pip до версии 18.1, установил virtualenv и создал папку с:

virtualenv --python=python3.6 MyFolder

После активации виртуальной среды это версии Python и pip:

python --version  # returns Python 3.6.7
pip --version # returns pip 18.1 from .... (python 3.6)

Если я пытаюсь установить новый пакет, например pip install pandas, я получаю следующую ошибку:

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pandas
  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/pandas/
...
 Could not fetch URL https://pypi.org/simple/pandas/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pandas/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
 Could not find a version that satisfies the requirement pandas (from versions: )
No matching distribution found for pandas
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

Однако, если я использую «глобальную» версию Python вне среды, pip работает нормально.

Вопрос: Что происходит и как я могу это исправить?

Спасибо за помощь! : D

...