pip не работает, TTPSConnectionPool (host = 'pypi.org', port = 443): превышено максимальное количество повторов - PullRequest
0 голосов
/ 13 июня 2018

Я пытаюсь это:

pip install numpy

Я получаю это:

The directory '/home/teoman/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
The directory '/home/teoman/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting numpy
  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/numpy/
  Retrying (Retry(total=3, 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/numpy/
  Retrying (Retry(total=2, 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/numpy/
  Retrying (Retry(total=1, 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/numpy/
  Retrying (Retry(total=0, 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/numpy/
  Could not fetch URL https://pypi.python.org/simple/numpy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/numpy/ (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 numpy (from versions: )
No matching distribution found for numpy

Я почти все перепробовал с этот вопрос , хотя проблема на самом деледругое (я заметил это сейчас) Что не так?

1 Ответ

0 голосов
/ 02 июля 2018

pip install --index https://pypi.mirrors.ustc.edu.cn/simple numpy

вы можете использовать '--index', чтобы указать зеркало python lib

для пользователя из Китая, вот несколько зеркал:100 了 一些 国内 镜像 如下 :

阿里 云 http://mirrors.aliyun.com/pypi/simple/

中国 科技 大学 https://pypi.mirrors.ustc.edu.cn/simple/

дубан http://pypi.douban.com/simple

Python 官方 https://pypi.python.org/simple

v2ex http://pypi.v2ex.com/simple

中国科学院 http://pypi.mirrors.opencas.cn/simple/

清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/

...