[Linux] Modify the mirror address of easy_install and pip

Using easy_install and pip makes module installation and management in Python very simple. However, if you are in China, the download speed 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 usually two methods to modify the mirror address for easy_install and pip, which can be done using commands or configuration.

Method 1: Temporarily modify easy_install using commands:

easy_install -i fabric


pip -i install fabric

Method 2: Modify easy_install using 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 address is provided by Anjuke: Public:

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