在 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 包名

Logo

2万人民币佣金等你来拿,中德社区发起者X.Lab,联合德国优秀企业对接开发项目,领取项目得佣金!!!

更多推荐