How to install pip with Python 3?

后端 未结 21 1297
夕颜
夕颜 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:04

    For python3 try this:

    wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python
    

    The good thing is that It will also detect what version of python you have (even if it's an environment of python in your custom location). After this you can proceed normally with (for example)

    pip install numpy
    

    source: https://pypi.python.org/pypi/setuptools/1.1.6#upgrading-from-setuptools-0-6

提交回复
热议问题