python pip常用基本指令

从清华源下载(临时) 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 

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

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

 

你可能感兴趣的:(Python)