【python】pip install 报错Could not fetch URL https://pypi.org/simple/json-schema/

萨科潘

关注

阅读 60

2022-06-23

问题现象

Could not fetch URL https://pypi.org/simple/json-schema/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/json-schema/ (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))) - skipping
ERROR: Could not find a version that satisfies the requirement json_schema (from versions: none)
ERROR: No matching distribution found for json_schema

解决方案

正常安装的时候我们都是用 ​​pip install​​​ 三方库
如果出现上述错误 ,就把命令改成
​​​pip --trusted-host pypi.python.org install​​ 三方库

pip install 后面跟自己要安装的库名即可

python -m pip install 库名  --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org

参考链接

精彩评论(0)

0 0 举报