[Python instance 6.8] To solve the pip tool sometimes cannot be installed normally, take the requests library as an example to break

To solve the pip tool sometimes cannot be installed normally, take the requests library as an example to break

Foreword: pip is a very powerful module installation tool. Anyone who has learned python knows that the installation library is generally prone to running errors, and a red English appears, which can’t read it. It is originally white but red English appears. The mentality is Not very broken! Don't worry, as long as I use my method, my mother won't have to worry about me learning programming anymore. Hehe~~

1. Create a pip folder on the C drive

Insert picture description here

2. Create a pip.ini file in the folder

Insert picture description here
Insert a piece of code in the document, as follows:
Insert picture description here
Common domestic sources are:
Tsinghua: https://pypi.tuna.tsinghua.edu.cn/simple
Douban: http://pypi.douban.com/simple/
Ali: http: //mirrors.aliyun.com/pypi/simple/

Tsinghua source is generally used, the other two are not very useful, personal choice~

3. Open cmd, enter pip install requests, press enterInsert picture description here

4.Successfully, this step will be successful
~
~
~
each better than the last time to sum up, thank you ~

Guess you like

Origin blog.csdn.net/A6_107/article/details/106626114