CentOS7 installation Python-pip

Source: Internet
Author: User
Tags gpg

One of the most useful package management tools in Python is Python-pip is an essential tool for our use of Python. But there are some minor problems with CentOS7 installation:

[[email protected] magic]# yum install Python-pip loaded plugin: fastestmirror, langpacksloading mirror speeds from cached hostfile * Base:mirrors.btte.net * extras:mirrors.btte.net * updates:mirrors.btte.net no available packages Python-pip. Error: No processing required

  

After reviewing the information, it is because the official CentOS source some time lag caused. So we can use the EPEL (Http://fedoraproject.org/wiki/EPEL) built by the Fedora community to install:

[Email protected] magic]#sudo Yum-YInstallepel-Release Loaded plugin: Fastestmirror, langpacksloading mirror speeds from cached Hostfile*base:mirrors.btte.net*extras:mirrors.btte.net*updates:mirrors.btte.net is addressing dependencies-Checking Transactions---> Package epel-release.noarch.0.7-9will be installed-resolve dependencies to complete dependency relationships=============================================================================================================Package schema version source size=============================================================================================================Installing: Epel-release Noarch7-9Extras -k Transaction Summary=============================================================================================================installation1Total Package Downloads: -k installation Size: -kdownloading Packages: Warning:/var/cache/Yum/x86_64/7/extras/packages/epel-release-7-9. noarch.rpm: Head V3 rsa/SHA256 Signature, key ID F4a80eb5:nokeyepel-release-7-9the public key of the. NOARCH.RPM is not installed Epel-release-7-9. noarch.rpm | -Kbxx:xx:xxfromfile:///etc/pki/rpm-gpg/rpm-gpg-key-centos-7 Retrieving KeysImport GPG Key0XF4A80EB5: User id:"CentOS-7 Key (CentOS 7 official Signing key) <[email protected]>"Fingerprint:6341ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5 package: CentOS-release-7-3.1611. el7.centos.x86_64 (@anaconda) from:/etc/pki/rpm-gpg/rpm-gpg-key-centos-7Running Transaction checkrunning transaction testtransaction Test succeededrunning transaction Installing: Epel-release-7-9. noarch1/1verified in: Epel-release-7-9. noarch1/1installed: Epel-release.noarch0:7-9It's over ! 

Then install PYTHON-PIP:

 

[[email protected] magic]# sudo yum-y install python-pip loaded plugin: Fastestmirror, Langpacksepel/x86_64/metalink | 5.6 KB 00:00:00 Epel | 4.3 KB 00:00:00 (1/3): Epel/x86_64/group_gz | KB 00:00:00 (2/3): Epel/x86_64/updateinfo | 749 KB 00:00:04 (3/3): epel/x86_64/primary_db | 4.6 MB 00:02:25 Loading mirror speeds from cached Hostfile * base:mirrors.btte.net * epel:mirrors.neusoft.edu.cn * Extras:mirrors.btte.net * Updates:mirrors.btte.net is resolving dependencies-checking transactions---> Packages python2-pip.noarch.0.8.1.2-5.el7 will be installed--resolve dependencies to complete dependency resolution ====================================================================================== ======================= Package                    Schema version Source size ==============================                 =============================================================================== Installing: Python2-pip noarch 8.1.2-5.EL7 Epel 1.7 m transaction summary ================================================ ============================================================= installation 1 Package total Downloads: 1.7 m installation Size: 7.2 mdownloading Packages: Warning:/ var/cache/yum/x86_64/7/epel/packages/python2-pip-8.1.2-5.el7.noarch.rpm: Head V3 rsa/sha256 Signature, key ID 352c64e5:                                                    NOKEYPYTHON2-PIP-8.1.2-5.EL7.NOARCH.RPM public key is not installed python2-pip-8.1.2-5.el7.noarch.rpm | 1.7 MB 00:00:07 Retrieve key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 import GPG key 0x352c64e5: User id: "Fedora EPEL (7) & Lt  [email protected]> "fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5 Package: Epel-release-7-9.noarch (@extras) From:/etc/pki/rpm-gpg/rpm-gpg-key-epel-7running transaction checkrunning Transaction testtransaction test                                                           Succeededrunning Transaction Installing: Python2-pip-8.1.2-5.el7.noarch  1/1 verified in: Python2-pip-8.1.2-5.el7.noarch 1/1 installed: Python2-pip.noarch 0:8.1.2-5.el7 finished!

Then run it and try it out:

[[email protected] magic]# pip--helpusage:pip <command> [Options]commands:install I  Nstall packages.  Download Download packages.  Uninstall Uninstall packages.  Freeze Output installed packages in requirements format.  List List installed packages.  Show show information about installed packages.  Search Search PyPI for packages.  Wheel Build wheels from your requirements.  Hash Compute hashes of the package archives. Completion A helper command used for command completion help Show Help for Comman Ds.  General Options:-H,--help Show help.                              --isolated Run pip in an isolated mode, ignoring environment variables and user  Configuration. -V,--verbose Give more output. OPtion is additive, and can being used up to 3 times.  -V,--version Show version and exit.  -Q,--quiet Give less output.  --log <path> Path to a verbose appending log.  --proxy <proxy> Specify a proxy in the form [User:[email protected]]proxy.server:port.  --retries <retries> Maximum Number of retries each connection should attempt (default 5 times).  --timeout <sec> Set The socket timeout (default seconds).                              --exists-action <action> Default Action when a path already exists: (s) witch, (i) Gnore, (W) Ipe,  (b) ackup.  --trusted-host 

  

PS: Without the authorization of the author, declined reprint!

CentOS7 installation Python-pip

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.