https://github.com 的链接前添加:
https://ghproxy.com/
git clone https://ghproxy.com/https://github.com/stilleshan/ServerStatus

Official site: Installing Packages — Python Packaging User Guide

清华:https://pypi.tuna.tsinghua.edu.cn/simple

阿里云:http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

豆瓣:http://pypi.douban.com/simple/

从清华源下载(临时) package

sudo -H pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python opencv-contrib-python

设为默认

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

升级pip

python -m pip install --upgrade pip
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U 
python -m pip install --extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple 
python -m pip install --no-index --find-links=/local/dir/ SomeProject

查看某个本地安装包目前的版本 

ERROR: scikit-image 0.17.2 has requirement imageio>=2.3.0, but you'll have imageio 2.2.0 which is incompatible.
ERROR: scikit-image 0.17.2 has requirement scipy>=1.0.1, but you'll have scipy 1.0.0 which is incompatible.

Linux:
$ pip freeze | grep scipy

Windows:
c:\> pip freeze | findstr scipy

查看服务器端提供的版本

pip install scipy==

安装指定版本的package

pip install 'stevedore>=1.3.0,<1.4.0' --force-reinstall

pip install scipy==1.4.1 --force-reinstall

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐