Home  >  Article  >  Backend Development  >  How to permanently modify the pip image source in windows and linux environments

How to permanently modify the pip image source in windows and linux environments

WBOY
WBOYOriginal
2016-12-05 13:27:232953browse

1. How to modify the pip image source in the windows environment (taking python3.5 as an example)

(1): In the windows file manager, enter %APPDATA%<br>

<br>

(2): It will locate a new directory, create a new pip folder in the directory, and then go to the pip folder to create a new pip.ini file<br>

<br>

(3): Enter the following content in the newly created pip.ini file and it’s done<br>

[global]
timeout = 6000
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com

2. How to update pip source in Linux system (take centos, python2.7 as an example)

The modification method in the Linux environment is basically the same as the modification method in the Windows environment. Here is a brief summary:<br>

(1): Create a folder named .pip under the user’s home directory<br>

(2): Create a file named pip.conf in the created .pip folder<br>

(3): Enter the following content in the pip.conf file, ok!!!<br>

[global]
timeout = 6000
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com

Summary

The above is the entire content of this article. I hope that the method provided in this article can bring some help to everyone's study or work. If you have any questions, you can leave a message to communicate.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn