python pip use

First, the source modification pip

Windows

New in the user directory pip \ pip.ini file, such as: C: \ Users \ Administrator \ pip \ pip.ini

[global] 
index-url = https://mirrors.aliyun.com/pypi/simple/

Linux

# Temporary use of mirror sites to upgrade PIP 
PIP install -i HTTPS: // pypi.tuna.tsinghua.edu.cn/simple PIP -U 

# command to modify the source 
PIP config the SET global.index -url HTTPS: // pypi.tuna .tsinghua.edu.cn / Simple 


# modify the source file modified 
Vim ~ / .config / PIP / pip.conf 

[Global] 
index -url = HTTPS: // pypi.tuna.tsinghua.edu.cn/simple

Some pip domestic Mirror

Ali cloud: https: //mirrors.aliyun.com/pypi/simple/ 
China University of Science and Technology: https: //pypi.mirrors.ustc.edu.cn/simple/ 
watercress (douban): https: //pypi.douban. com / simple / 
Tsinghua University: https: //pypi.tuna.tsinghua.edu.cn/simple/ 
University of Science and technology of China: https: //pypi.mirrors.ustc.edu.cn/simple/

 

Second, the commonly used commands pip

# Installation 
PIP install numpy 

# uninstall 
PIP Uninstall numpy 

# install the specified version of the 
PIP install numpy 1.16.0 == 

# update 
pip install -U numpy

 


https://mirrors.tuna.tsinghua.edu.cn/help/pypi/

Guess you like

Origin www.cnblogs.com/jhxxb/p/11288575.html
Recommended