Python Forum

Full Version: Issue with 2 version of python (2.6.6 and 2.7) with pip
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have default python version 2.6.6 and pip is working with that. But when I installed python2.7, it was installed in different path( /usr/local/bin/python2.7). My main concern is pip is not working with 2.7 and getting error No module named pip. Is it possible to install separate pip for 2.7 or we can use existing pip with 2.7. Please suggest.

[jack@server ~]$ python --version
Python 2.6.6
[jack@server ~]$ which python
/usr/bin/python
[jack@server ~]$ which pip
/usr/bin/pip
[jack@server ~]$ which python2.7
/usr/local/bin/python2.7
[jack@server ~]$ python2.7 --version
Python 2.7
[jack@server ~]$ sudo python2.7 -m pip install pymongo
[sudo] password for jack:
/usr/local/bin/python2.7: No module named pip
neither 2.6 nor 2.7 are supported any longer, you can still find some packages for 2.7 in pypi.org.
version 2.7.9 was first to automatically install pip.
older versions used EasyInstall, part of setuptools docs: https://setuptools.readthedocs.io/en/lat...stall.html
why not upgrade?
current python version is 3.8.2
How can I uninstall current python2.7 and how to install automatically 2.7.9 with pip? Kindly suggest