How to install pip with Python 3?

后端 未结 21 1248
夕颜
夕颜 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 01:47

    This is what I did on OS X Mavericks to get this to work.

    Firstly, have brew installed

    Install python 3.4

    brew install python3
    

    Then I get the latest version of distribute:

    wget https://pypi.python.org/packages/source/d/distribute/distribute-0.7.3.zip#md5=c6c59594a7b180af57af8a0cc0cf5b4a
    
    unzip distribute-0.7.3.zip
    cd distribute-0.7.3
    sudo setup.py install
    sudo easy_install-3.4 pip
    sudo pip3.4 install virtualenv
    sudo pip3.4 install virtualenvwrapper
    
    mkvirtualenv py3 
    
    python --version
    Python 3.4.1
    

    I hope this helps.

提交回复
热议问题