Get the App
SLTechnology News&Howtos  ›  Servers  › 

Pip uses domestic mirror sources

Shulou Source: shulou.com Published: 2022-06-02 01:25:28 10月03日 Update

Commonly used domestic images:

(1) Aliyun http://mirrors.aliyun.com/pypi/simple/

(2) Douban http://pypi.douban.com/simple/

(3) https://pypi.tuna.tsinghua.edu.cn/simple/ of Tsinghua University

(4) http://pypi.mirrors.ustc.edu.cn/simple/ of University of Science and Technology of China

(5) http://pypi.hustunique.com/ of Huazhong University of Science and Technology

Method 1: use it temporarily

Add the parameter-I and the image address

For example:

Pip install-I https://pypi.tuna.tsinghua.edu.cn/simple scrapy

Method 2: permanently modify

Linux:

Modification: pip.conf did not create a folder or file. Add "." to the folder to indicate that it is a hidden folder.

[global]

Index-url = https://pypi.tuna.tsinghua.edu.cn/simple

[install]

Trusted-host = https://pypi.tuna.tsinghua.edu.cn

Windows:

Create a pip directory directly in the user directory, such as: C:\ user\ xx\ pip, and then create a new file pip.ini with the following contents:

[global]

Index-url = https://pypi.tuna.tsinghua.edu.cn/simple

[install]

Trusted-host = https://pypi.tuna.tsinghua.edu.cn

Tags: Files universities folders images methods directories contents parameters addresses commonly used technology users science and technology science and technology Douban Ali Huazhong University of Science and Technology China Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Shulou Information NVidia Huawei Redmi