python-3.x - 安装 numpy 时未验证 ssl 证书
问题描述
在命令提示符下使用下面给出的命令安装 numpy 时出现问题。 尝试安装metplotlib,numpy,scipy,但每次都面临同样的问题。下面是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 的匹配分布
解决方案
使用此命令而不是“pip install numpy”。这最终为我工作。
pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org numpy
推荐阅读
- spring - Spring data cassandra - 无法为 WriteOptions 解析属性 [retryPolicy] 的 DataType
- azure-web-app-service - 每个应用服务基础的应用服务计划资源利用率
- tcl - 如何在 Tcl 的反射通道中使用 chan postevent
- python-3.x - 协助密码猜谜游戏 Python
- microsoft-graph-api - Microsoft 图形工具包 (mgt) 无法在 mgt-person 中获取用户
- shell - 验证后使用 curl 下载文件
- api - Twitter API 按关键字获取列表标签
- javascript - Firebase:如何获取数据
- javascript - 让用户修改 Chrome 扩展的 manifest.json 内容的编程方法
- mongodb - Mongo Json Schema Validator AnyOf 不工作