[Linux] Modify the mirror addresses of easy_install and pip

[Linux] Modifying the mirror address of easy_install and pip

Using easy_install and pip makes installing and managing Python modules very simple. However, if you are in China, downloading from the official mirror can be frustrating. Just like modifying the mirror address for apt-get or yum, easy_install and pip also need to have their mirror address modified. There are two methods to modify the mirror address for easy_install and pip, which can be done through commands or configuration.

Method 1: Temporarily modify easy_install using commands:

easy_install -i fabric


pip -i install fabric

Method 2: Modify easy_install through configuration:

  1. Open pydistutils.cfg

vi ~/.pydistutils.cfg

  1. Write the following content:

index_url =


  1. Open pip.conf

vi ~/.pip/pip.conf

  1. Write the following content:

index-url =

The faster mirror addresses in China are provided by Tsinghua University, with servers located in Beijing. The public server is the official mirror: Public: Education network:

The following mirror is provided by Anjuke: Public:

Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.