当前位置 : 主页 > 编程语言 > python >

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

来源:互联网 收集:自由互联 发布时间:2022-06-24
问题现象 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 / jso

问题现象

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

参考链接

上一篇:nohup不能及时打印python print日志
下一篇:没有了
网友评论