【python】pip install 报错Could not fetch URL https:pypi.orgsimplejson-schema

【python】pip install 报错Could not fetch URL https:pypi.orgsimplejson-schema,第1张

问题现象
 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 

参考链接
https://www.cnblogs.com/mumuluo/p/11308468.html

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/785959.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-04
下一篇 2022-05-04

发表评论

登录后才能评论

评论列表(0条)

保存