Configuring the PIP Source

Configure the pip source as follows:

  1. Run the following command as the installation user of the software package:
    cd ~/.pip

    If a message indicating that the directory does not exist is displayed, run the following commands to create and go to the directory:

    mkdir ~/.pip 
    cd ~/.pip
  2. Edit the pip.conf file.

    Run the vi pip.conf command to open the pip.conf file and edit the file as follows.

    [global]
    # Huawei source is used as an example. Replace it based on the actual situation.
    index-url = https://mirrors.huaweicloud.com/repository/pypi/simple
    trusted-host = mirrors.huaweicloud.com
    timeout = 120
  3. Run the :wq! command to save the file and exit.