Install python pip module using yum on Red Hat/Fedora Linux

Source: Internet
Author: User

Pip is a tool that can replace easy_install to install and manage python packages. For details about the python packages that can be installed, refer to the Python Package Index here.

The python-pip package is provided in fedora to install pip. Unlike other systems, pip-python is used to run the package:

tiny@i ~$ yum search python-pip

======================= N/S Matched: python-pip ========================
python-pip.noarch : Pip installs packages. Python packages. An
: easy_install replacement
tiny@i ~$ sudo yum install python-pip
  

 

However, the pip command cannot be found during running. It should be considered that the package that runs the same command as pip exists. To avoid conflicts, pip-python is used:

Tiny @ I ~ $ Which pip
/Usr/bin/which: no pip in (/usr/local/bin:/usr/local/sbin:/usr/sbin: /sbin:/home/tiny /. local/bin:/home/tiny/bin)
Tiny @ I ~ $ Rpm-ql python-pip
/Usr/bin/pip-python
... (Omitted rows)

Tiny @ I ~ $ Which pip-python
/Usr/bin/pip-python
  

 

However, we can re-install pip (recursion?) Through pip without using the legendary pip ?), Then you can directly use the pip command:

tiny@i ~$ sudo pip-python install -U pip

tiny@i ~$ sudo pip install virtualenv
[sudo] password for tiny:
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/lib/python2.7/site-packages
Cleaning up...

Done!

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.