Ubuntu: Change default python version in IDLE



Question:

So, I'd like to have Python 2.7.6 when I open the IDLE (that is the one pre-installed on Ubuntu); instead, the idle opens with the one that I have installed (2.7.5). How can I do that?


Solution:1

sudo nano /usr/bin/idle-python2.7

It looks like this

#! /usr/bin/python2.7    from idlelib.PyShell import main  if __name__ == '__main__':      main()  

Change the end of the first line to reflect your desire.

#! /usr/bin/python2.7.6   

^X to save, and y to consent.

Give it a whirl.


Solution:2

If you need Python 2 just type idle in terminal.

If you need Python3 type idle3.

I have both Python2 and Python3 installed and also idle and idle3.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »