How to permanently modify the pip image source in windows and linux
1. How to modify pip image source in windows (using python3.5 as an example)
(1): In windows File Manager, enter% APPDATA %
(2): locates in a new directory, creates a new pip folder under the directory, and then creates a new pip. ini file in the pip folder.
(3): Enter the following content in the new pip. ini file.
[Global] timeout = 6000index-url = http://pypi.douban.com/simpletrusted-host = pypi.douban.com
Ii. Update pip source in linux (take centos and python2.7 as an example)
In linux, the modification method is basically the same as in windows. Here is a brief summary:
(1): Create a. pip folder under the user's home directory.
(2): create a file named pip. conf in the created. pip folder.
(3): Enter the following content in the pip. conf file. OK !!!
[Global] timeout = 6000index-url = http://pypi.douban.com/simpletrusted-host = pypi.douban.com
Summary
The above is all about this article. I hope this method will help you in your study or work. If you have any questions, please leave a message.