python -m pip install --upgrade pip 解决升级不成功问题

Jane ·
更新时间:2024-09-20
· 734 次阅读

使用pip 提示更新:
You are using pip version 18.1, however version 20.0.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

输入 python -m pip install --upgrade pip出现问题
在这里插入图片描述
这是因为服务器连接超时,使用下方代码即可解决(因为pip源在国外,所以连起来比较慢,可以改用国内的源)

python -m pip install --upgrade pip -i https://pypi.douban.com/simple

在这里插入图片描述
在这里插入图片描述问题解决

安装其他包也可使用此方法加快下载速度
比如 安装pip install scipy

pip install scipy -i https://pypi.douban.com/simple

安装

C:\WINDOWS\system32>pip install scipy -i https://pypi.douban.com/simple Looking in indexes: https://pypi.douban.com/simple Collecting scipy Downloading https://pypi.doubanio.com/packages/61/51/046cbc61c7607e5ecead6ff1a9453fba5e7e47a5ea8d608cc7036586a5ef/scipy-1.4.1-cp37-cp37m-win_amd64.whl (30.9 MB) |████████████████████████████████| 30.9 MB 6.8 MB/s Collecting numpy>=1.13.3 Downloading https://pypi.doubanio.com/packages/a9/38/f6d6d8635d496d6b4ed5d8ca4b9f193d0edc59999c3a63779cbc38aa650f/numpy-1.18.1-cp37-cp37m-win_amd64.whl (12.8 MB) |████████████████████████████████| 12.8 MB 6.4 MB/s Installing collected packages: numpy, scipy Successfully installed numpy-1.18.1 scipy-1.4.1 C:\WINDOWS\system32>
作者:Cement20



pip install install pip Python

需要 登录 后方可回复, 如果你还没有账号请 注册新账号