Home > Backend Development > Python Tutorial > Detailed explanation of pip changing domestic source examples

Detailed explanation of pip changing domestic source examples

零下一度
Release: 2017-06-27 10:23:11
Original
2599 people have browsed it

Linux environment:

You can use the mirror source directly, add -i to specify the address:

1 sudo pip install -i  模块名
Copy after login

If an untrusted error occurs:

You need to add

1 sudo pip install -i  --trusted-host pypi.douban.com 模块名
Copy after login

after the command. It is troublesome to enter the address every time. You can change the default configuration, ~/.pip /pip.conf, generally this file needs to be created by yourself.

File content:

1 [global]2 index-url = simple3 [install]4 trusted-host=pypi.douban.com
Copy after login

Windows environment:

Like Linux, it can be installed directly through the command line.

If you need to modify the default configuration, you need to create a new pip folder and pip.inf file under the current user.

#The configuration content is the same as that of Linux.

After the new file is created, append: %USERPROFILE%\pip\pip.ini after the environment variable Path.

The above is the detailed content of Detailed explanation of pip changing domestic source examples. For more information, please follow other related articles on the PHP Chinese website!

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