问题描述:
1.在使用pip install 安装python的库时,出现:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ProxyError(‘Cannot connect to proxy.’, NewConnectionError(’<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000002378B7724C8>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。’))’: /pypi/simple/librosa/
2.pip换源
解决方案:
-
没有给pip换源
win系统下:
1).在C:\Users\用户名\下创建文件夹pip,并在pip下创建pip.ini
2).打开pip.ini,将下面内容复制并保存[global] index-url = https://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com disable-pip-version-check = true timeout = 6000
linux系统下:
命令如下:mkdir -p ~/.pip/ touch pip.conf vim pip.conf
pip.conf编辑如下:
[global] index-url=http://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com
-
你的VPN没有关,把你的VPN关掉
版权声明:本文为weixin_44493758原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。