Home >Backend Development >Python Tutorial >How to install pip on centos7
How to install pip on centos7: 1. Open the terminal, enter the "sudo yum update" command to update the yum package list, enter the "sudo yum install python-pip" command to install pip, and finally verify whether pip has been installed The installation is successful; 2. Open the terminal, use the wget command to download the "get-pip.py" script file, run the "get-pip.py" script in the terminal, and finally verify whether pip has been installed successfully.
# Operating system for this tutorial: Windows 10 system, Dell G3 computer.
There are two ways to install pip on CentOS 7, as follows:
1. Open the terminal and enter the following command to Update the yum package list:
sudo yum update
2. Enter the following command to install pip:
sudo yum install python-pip
3. Verify that pip has been installed successfully. Enter the following command in the terminal:
pip --version
If the version information of pip is displayed, it means that pip has been successfully installed.
1. Open the terminal and use the wget command to download the get-pip.py script file. You can use the following command:
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
2. Enter the following command in the terminal to run the get-pip.py script:
sudo python get-pip.py
3. Verify that pip has been installed successfully. Enter the following command in the terminal:
pip --version
If the version information of pip is displayed, it means that pip has been successfully installed.
Please note that before installing pip, make sure your system has Python installed. In addition, the get-pip.py script in method two may fail in some cases, so it is recommended to use method one for installation.
The above is the detailed content of How to install pip on centos7. For more information, please follow other related articles on the PHP Chinese website!