Python fails to install some packages using pip

Python will fail to install some packages, you can switch the source, the domestic Tsinghua source is easier to use
1. One-time use For
example, install numpy
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy
2
.Long -term use Modify the
Insert picture description here
contents of the pip/pip.ini file under the user folder to

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

You can also use the command line, the effect is the same
Insert picture description here

Guess you like

Origin blog.csdn.net/rj2017211811/article/details/106442670