繁体   English   中英

pip不起作用,TTPSConnectionPool(host ='pypi.org',port = 443):超过了最大重试次数

[英]pip does not work, TTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded

我尝试这样:

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

即使问题确实有所不同(我现在注意到了),我几乎已经尝试了该问题的所有内容, 是怎么回事?

点安装--index https://pypi.mirrors.ustc.edu.cn/simple numpy

您可以使用'--index'指定python lib镜像

对于中国地区的用户,以下是一些镜像:找到了一些国内替代如下:

云阿里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/

暂无
暂无

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

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