Python-pip commonly used commands

Python-pip commonly used commands

Display version and path

pip --version

Getting Help

pip --version

Upgrade pip

pip install -U pip
pip install --upgrade pip

Installation package

pip install SomePackage                # 最小版本
pip install SomePackage==1.0.4         # 指定版本

Upgrade package

pip install --upgrade SomePackage

Uninstall package

pip uninstall SomePackage

Shows the installation package information

pip show

List installed packages

pip list

Check scalable package

pip list -o

common problem

1. Tip no module name pip
Solution: Enter

pip -m ensurepip;
easy_install pip

2. Change pip source
may be used when the pip, add parameters -i and mirror address (e.g.
https://pypi.tuna.tsinghua.edu.cn/simple),
for example: pip install -i https: // pypi .tuna.tsinghua.edu.cn / simple pandas, which installs pandas Tsinghua University libraries from the mirror.

(1) Ali cloud http://mirrors.aliyun.com/pypi/simple/
(2) watercress http://pypi.douban.com/simple/
(3), Tsinghua University https: //pypi.tuna.tsinghua. edu.cn/simple/
(4) China Science and technology University http://pypi.mirrors.ustc.edu.cn/simple/
(5), Huazhong University of Science and technology http://pypi.hustunique.com/

Published 33 original articles · won praise 1 · views 2305

Guess you like

Origin blog.csdn.net/qq_40805620/article/details/95527106