Home > Backend Development > Python Tutorial > 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
Release: 2016-12-05 13:27:23
Original
2969 people have browsed it

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
Copy after login

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:

(1): Create a folder named .pip 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 = 6000
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com
Copy after login

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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template