0

I am facing a weird problem. If I have just installed python 2.7.6 in addition to already present python 2.7.3.

But this is giving me some weird issues. Such as even though my system has pyqt4, python is complaining I don't have pyqt. When I am trying to run the following command in terminal, it is saying:

 sudo apt-get install python-qt4

The module is already present. When I am typing the following command:

$which python
/usr/local/bin/python

Which is python 2.7.6. I am really struggling now. Kindly help.

1 Answers1

1

I would not recommend to have two 2.7.x versions installed. If you need for some project a specific additional version, use virtual environments instead.

If you need to get rid of one python system wide version, stick to this recommendations.

To change between different installations of python, use

sudo update-alternatives --config python

to configure them. However, that would most likely trigger problems with future updates.

Marcus
  • 431
  • yes..that seems to be the rightway. But now how to uninstall 2.7.6 and back off to 2.7.3 (system). I have screwed up the symbolic links, and lots of other stuff. Please help me in how to restore back to system deafult. – user3001408 Feb 13 '15 at 17:55
  • I am not aware of your actual changes ("lot of other stuff"). The proper way for switching python version is sudo update-alternatives --config python. The default version you should switch to (and your system rely on) 2.7.3. – Marcus Feb 13 '15 at 18:07
  • nope..not working – user3001408 Feb 13 '15 at 18:09
  • I guess that is basically another question. Try recommendations of this question. If not working, you should better open another question with your detailed changes for overview purposes or add them to this question :) – Marcus Feb 13 '15 at 18:14