Easy_install gets the wrong version of pip

I followed the instructions at http://docs.python-guide.org/en/latest/starting/install/osx/ , but for some reason this is not happening as I expect it to be expected.

I have python 2.7 working by default, but I needed to update easy_install by following these instructions: https://superuser.com/questions/256717/easy-install-the-wrong-version-of-python-modules-mac -os and linking it to / usr / local / bin / share / usr / local / bin. It seems to be working fine.

The problem is that now, when I install pip, it seems to install 2.6, not 2.7.

darky:~ user$ easy_install --upgrade pip Searching for pip Reading http://pypi.python.org/simple/pip/ Reading http://pip.openplans.org Reading http://www.pip-installer.org Best match: pip 1.1 Processing pip-1.1-py2.6.egg pip 1.1 is already the active version in easy-install.pth Installing pip script to /usr/local/bin Installing pip-2.6 script to /usr/local/bin Using /Library/Python/2.6/site-packages/pip-1.1-py2.6.egg Processing dependencies for pip Finished processing dependencies for pip 

After MartijnPieters comments, this problem is NO LONG persist

  darky:~ user$ /usr/local/share/python/easy_install-2.7 pip Searching for pip Best match: pip 1.1 Processing pip-1.1-py2.7.egg pip 1.1 is already the active version in easy-install.pth Installing pip script to /usr/local/share/python Installing pip-2.7 script to /usr/local/share/python Using /usr/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg Processing dependencies for pip Finished processing dependencies for pip darky:~ user$ pip install virtualenv --upgrade Requirement already up-to-date: virtualenv in /Library/Python/2.6/site-packages Cleaning up... 

But pip is still creating environments with python-2.6. So I have to point it to the correct python interpreter.

  darky:pytravisci pedrorodrigues$ virtualenv --python=/usr/local/bin/python2.7 ENV Running virtualenv with interpreter /usr/local/bin/python2.7 New python executable in ENV/bin/python Installing setuptools............................done. Installing pip...............done. 
+1
source share
1 answer

you can use

 easy_install-2.7 

or if you do not have this alias:

 python2.7 -m easy_install <stuff> 

For pip:

 pip2.7 
+1
source

Source: https://habr.com/ru/post/1495074/


All Articles