Installation source disposed PyPi

 

Pip each time when using the installation -i command installation source

Case

pip install django

  

for

pip install -i http://pypi.douban.com/simple/ django

  

 


Set the default source of pip

 

Change the profile mode (if any New):

 

vim ~/.config/pip/pip.conf

  

  

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

  

 

Command mode: 

pip config set global.index-url https://pypi.douban.com/simple

  


Commonly used several sources:
Ali:

http://mirrors.aliyun.com/pypi/simple/

Watercress:

https://pypi.douban.com/simple

Tsinghua:

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

HKUST:

http://pypi.mirrors.ustc.edu.cn/simple/

Guess you like

Origin www.cnblogs.com/jrri/p/12337917.html