Pycharm 安装 scipy 失败

文章讲述了在Pycharm终端使用pip安装scipy时遇到的连接问题,原因是镜像源问题。解决方法是临时切换到清华大学源,或设置默认源并升级pip。更新包时需使用`pipinstall--upgrade包名`。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在 Pycharm 中终端进行下载

pip install scipy

出现一下报错原因:

Looking in indexes: http://pypi.douban.com/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'Protoco
lError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/scipy/        
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'Protoco
lError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/scipy/        
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'Protoco
lError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/scipy/        
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'Protoco
lError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/scipy/        
ERROR: Could not find a version that satisfies the requirement scipy (from versions: none)
ERROR: No matching distribution found for scipy

最后也是莫名其妙的解决,因为我的镜像源还是豆瓣

解决方法:

切换临时的清华源

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

或者设置默认永久的清华源

python -m pip install --upgrade pip

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

如果出现了 pip 更新,直接按照提示运行它的命令即可

然后 再 pip install scipy。

更新包的方法

pip install --upgrade 包名

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值