Configuring the PIP Source
Configure the pip source as follows:
- Run the following command as the installation user of the package:
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
- Edit the pip.conf file.
Run the vi pip.conf command to open the pip.conf file and add the following content to the file.
[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
- Run the :wq! command to save the file.
Parent topic: Common Operations