[root@localhost local]# python
Python 2.7.5 (default, Aug 7 2019, 00:51:29)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
#输入pip list系统提示命令没有找到
[root@localhost local]# pip list
bash: pip: command not found...
#输入yum install python-pip,提示没有可用 python-pip
[root@localhost local]# yum install python-pip
No package python-pip available.
1.2 执行安装yum -y install epel-release命令
[root@localhost local]# yum -y install epel-release
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
epel-release noarch 7-11 extras 15 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 15 k
Installed size: 24 k
Downloading packages:
epel-release-7-11.noarch.rpm | 15 kB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : epel-release-7-11.noarch 1/1
Verifying : epel-release-7-11.noarch 1/1
Installed:
epel-release.noarch 0:7-11
Complete!
1.3 再次执行yum install python-pip命令
[root@localhost local]# yum install python-pip
Existing lock /var/run/yum.pid: another copy is running as pid 3308.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 206 M RSS (626 MB VSZ)
Started: Tue Jan 21 10:53:57 2020 - 00:08 ago
State : Running, pid: 3308
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 260 M RSS (680 MB VSZ)
Started: Tue Jan 21 10:53:57 2020 - 00:10 ago
State : Sleeping, pid: 3308
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 260 M RSS (680 MB VSZ)
Started: Tue Jan 21 10:53:57 2020 - 00:12 ago
State : Sleeping, pid: 3308
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 260 M RSS (680 MB VSZ)
Started: Tue Jan 21 10:53:57 2020 - 00:14 ago
State : Sleeping, pid: 3308
Resolving Dependencies
--> Running transaction check
---> Package python2-pip.noarch 0:8.1.2-10.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
python2-pip noarch 8.1.2-10.el7 epel 1.7 M
Transaction Summary
================================================================================
Install 1 Package
Total download size: 1.7 M
Installed size: 7.2 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/epel/packages/python2-pip-8.1.2-10.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for python2-pip-8.1.2-10.el7.noarch.rpm is not installed
python2-pip-8.1.2-10.el7.noarch.rpm | 1.7 MB 00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
Userid : "Fedora EPEL (7) <epel@fedoraproject.org>"
Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
Package : epel-release-7-11.noarch (@extras)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python2-pip-8.1.2-10.el7.noarch 1/1
Verifying : python2-pip-8.1.2-10.el7.noarch 1/1
Installed:
python2-pip.noarch 0:8.1.2-10.el7
Complete!