Replace pip source to domestic mirror

Some domestic mirrors of pip

  Aliyun http://mirrors.aliyun.com/pypi/simple/University   of
  Science and Technology of China https://pypi.mirrors.ustc.edu.cn/simple/douban http://pypi.douban.com/simple /   Tsinghua University https://pypi.tuna.tsinghua.edu.cn/simple/   University of Science and Technology of China http://pypi.mirrors.ustc.edu.cn/simple/


Modify the source method:

Temporary use:
You can add the -i parameter after using pip to specify the pip source
eg: pip install scrapy -i https://pypi.tuna.tsinghua.edu.cn/simple

Permanent modification:
linux:
modify ~/.pip/pip.conf (create one if not), the content is as follows:

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

Windows:
Create a pip directory directly in the user directory, such as: C:\Users\xx\pip, and create a new file pip.ini with the following content

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

References:
1. https://blog.csdn.net/chenghuikai/article/details/55258957 2018.4.23

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327088238&siteId=291194637