What Do I Do If "Could not find a version that satisfies the requirement xxx" Is Displayed When "pip3 install" Is Run?

Symptom

During the installation of dependencies, a message is displayed indicating that the network connection fails when the command of pip3 install xxx is run, and the message "Could not find a version that satisfies the requirement xxx" is displayed. Run the apt-get update command to check that the sources are available. The error message is displayed as follows.

Figure 1 Message displayed upon installation using pip3.7.5

Possible Cause

The pip source is not configured.

Solution

Configure the pip source as follows:

  1. Run the following command as the ATC installation user.
    cd ~/.pip

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

    mkdir ~/.pip 
    cd ~/.pip

    Run the following command to create a pip.conf file in the .pip directory.

    touch pip.conf
  2. Edit the pip.conf file.

    Run the vi pip.conf command to open the pip.conf file, write the following content to the file, save the file, and exit:

    [global]
    #Configure the source as required.
    index-url=http://xxx
    [install]
    #Configure the trusted host as required.
    trusted-host=xxx