default pip install Is to use the official source for installation , Because it is abroad , Therefore, when downloading and installing, the installation will usually fail due to access timeout .
Some domestic mirror images :
Alibaba cloud : https://mirrors.aliyun.com/pypi/simple/
University of science and technology of China : https://pypi.mirrors.ustc.edu.cn/simple/
douban (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/
For temporary use, you can use the following code :
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple The third-party library you want to install
Permanent way :
Under the user folder C:\User\xxx\
Create a new one pip Folder , Then create a new text , Enter the following code (Windows):
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
course : Click the jump
The second method behind the personal test is effective