How to install pip in CentOS 7?

前端 未结 10 1222
暖寄归人
暖寄归人 2020-12-02 05:57

CentOS 7 EPEL now includes Python 3.4: yum install python34

However, when I try that, even though Python 3.4 installs successfully, it doesn\'t appear t

相关标签:
10条回答
  • 2020-12-02 07:00

    There is a easy way of doing this by just using easy_install (A Setuptools to package python librarie).

    • Assumption. Before doing this check whether you have python installed into your Centos machine (at least 2.x).

    • Steps to install pip.

      1. So lets do install easy_install,

        sudo yum install python-setuptools python-setuptools-devel

      2. Now lets do pip with easy_install,

        sudo easy_install pip

    That's Great. Now you have pip :)

    0 讨论(0)
  • 2020-12-02 07:00

    Figure out what version of python3 you have installed:

    yum search pip
    

    and then install the best match. Use reqoquery to find name of resulting pip3.e.g

    repoquery -l python36u-pip
    

    tells me to use pip3.6 instead of pip3

    0 讨论(0)
  • 2020-12-02 07:00

    On CentOS 7, the pip version is pip3.4 and is located here:

    /usr/local/bin/pip3.4
    
    0 讨论(0)
  • 2020-12-02 07:03

    The easiest way I've found to install pip3 (for python3.x packages) on CentOS 7 is:

    $ sudo yum install python34-setuptools
    $ sudo easy_install-3.4 pip
    

    You'll need to have the EPEL repository enabled before hand, of course.

    You should now be able to run commands like the following to install packages for python3.x:

    $ pip3 install foo
    
    0 讨论(0)
提交回复
热议问题