安装numpy时未验证ssl证书

时间:2018-07-08 07:47:56

标签: python-3.x numpy pip

使用下面命令提示符中给出的命令安装numpy时出现问题。      试图安装metplotlib,numpy,scipy但面临同样的问题      每次.below是numpy安装中的错误

> cd ..
> cd ..
> cd pyhton36
> cd scripts 
> pip install numpy
 collecting numpy

 Retrying (Retry(total=4, connect=None, read=None, redirect=None, 
status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: 
CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)'),)': 
/simple/numpy/
Could not fetch URL https://pypi.org/simple/numpy/: There was a problem 
confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', 
port=443): Max retries exceeded with url: /simple/numpy/ (Caused by 
SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify 
failed (_ssl.c:841)'),)) - skipping
Could not find a version that satisfies the requirement numpy (from versions: 
)
No matching distribution found for numpy
Could not fetch URL https://pypi.org/simple/pip/: There was a problem 
confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', 
port=443): Max retries exceeded with url: /simple/pip/ (Caused by 
SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify 
failed (_ssl.c:841)'),)) - skipping


so how can i correct this or can i install it in another way
I used command pip list :

package    version

pip        10.0.1

setuptools 39.0.1

Could not fetch URL https://pypi.org/simple/pip/: There was a problem        confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)'),)) - skipping

删除了python3.6.6,安装了python3.4.4,现在命令pip install numpy显示了错误:

找不到满足numpy要求的版本(来自版本:) 找不到numpy的匹配分布

1 个答案:

答案 0 :(得分:-1)

使用此命令代替“ pip install numpy”。最终为我工作。

  

pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org numpy