1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificat

Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificat

时间:2020-04-15 11:47:24

相关推荐

Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming  the ssl certificat

问题描述

cmd 输入pip install {包名}或者 cmd 输入python -m pip install --upgrade pip出现如下错误:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:777)'),)': /simple/pip/WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:777)'),)': /simple/pip/WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:777)'),)': /simple/pip/WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:777)'),)': /simple/pip/WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:777)'),)': /simple/pip/Could not fetch URL /simple/pip/: There was a problem confirmingthe ssl certificate: HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:777)'),)) - skippingCould not fetch URL /simple/pip/: There was a problem confirmingthe ssl certificate: HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:777)'),)) - skipping

网上找了很多方法,下面给出自己最后的解决方法:

Step1:

进入cmd ,输入指令,在C:/user/xx/路径下创建文件夹,并命名为“pip”

C:\Users\maple>md pip

Step2 :

在该文件夹下面创建一个文本文件,输入如下内容,并保存为名字为“pip.ini”(注意后缀)

[global]index-url=/pypi/simple/[install]trusted-host=

Step3:

配置系统变量Path,在最后添加如下内容(注意和前面内容之间用;隔开):

C:\Users\maple\pip\pip.in;

这一步也就是告诉系统可执行文件pip.ini的路径~~~

验证:

重新输入 pip install {包名} 成功!!! 如果有更好的解决办法欢迎各位留言私信提出来 :P ≈

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。