How to install pip with Python 3?

后端 未结 21 1295
夕颜
夕颜 2020-11-22 01:06

I want to install pip. It should support Python 3, but it requires setuptools, which is available only for Python 2.

How can I install pip with Python 3?

21条回答
  •  别那么骄傲
    2020-11-22 02:08

    Here is my way to solve this problem at ubuntu 12.04:

    sudo apt-get install build-essential libncursesw5-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev
    

    Then install the python3 from source code:

    wget https://www.python.org/ftp/python/3.4.0/Python-3.4.0.tar.xz
    tar xvf Python-3.4.0.tar.xz
    cd Python-3.4.0
    ./configure
    make
    make test
    sudo make install
    

    When you finished installing all of them, pip3 will get installed automatically.

提交回复
热议问题