Pip uses domestic mirror sources
Commonly used domestic images:
(1) Aliyun http://mirrors.aliyun.com/pypi/simple/
(2) Douban http://pypi.douban.com/simple/
(3) https://pypi.tuna.tsinghua.edu.cn/simple/ of Tsinghua University
(4) http://pypi.mirrors.ustc.edu.cn/simple/ of University of Science and Technology of China
(5) http://pypi.hustunique.com/ of Huazhong University of Science and Technology
Method 1: use it temporarily
Add the parameter-I and the image address
For example:
Pip install-I https://pypi.tuna.tsinghua.edu.cn/simple scrapy
Method 2: permanently modify
Linux:
Modification: pip.conf did not create a folder or file. Add "." to the folder to indicate that it is a hidden folder.
[global]
Index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
Trusted-host = https://pypi.tuna.tsinghua.edu.cn
Windows:
Create a pip directory directly in the user directory, such as: C:\ user\ xx\ pip, and then create a new file pip.ini with the following contents:
[global]
Index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
Trusted-host = https://pypi.tuna.tsinghua.edu.cn