当前位置:网站首页 > 更多 > 编程开发 > 正文

[Python] WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=N...PIP报错

作者:CC下载站 日期:2021-01-30 00:00:00 浏览:54 分类:编程开发

Python安装模块报错

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('_ssl.c:1106: The han

dshake operation timed out'))': /simple/parsel/

解决方案,配置PIP本地源

永久配置安装源

Windows
"""
1、文件管理器文件路径地址栏敲:%APPDATA%回车,快速进入C:Users电脑用户AppDataRoaming文件夹中
2、新建pip文件夹并在文件夹中新建pip.ini配置文件
3、新增pip.ini配置文件内容
"""
MacOS、Linux
"""
1、在用户根目录下~下创建.pip隐藏文件夹,如果已经有了可以跳过
--mkdir~/.pip
2、进入.pip隐藏文件夹并创建pip.conf配置文件
--cd~/.pip&&touchpip.conf
3、启动Finder(访达)按cmd+shift+g来的进入,输入~/.pip回车进入
4、新增pip.conf配置文件内容
"""
配置文件内容
"""
[global]
index-url=http://pypi.douban.com/simple
[install]
use-mirrors=true
mirrors=http://pypi.douban.com/simple/
trusted-host=pypi.douban.com
"""

参考文章:https://www.cnblogs.com/tuanzibuku/p/11214423.html


您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯