Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have downloaded and installed python 3.2.3 for Ubuntu/Debian. Also IDLE IDE for 3.2.3.

If I execute IDLE for 3.2.3 explicitely, 3.2.3 runs under IDLE and all is well.

But if I go to a terminal session and simple run Python, it defaults to python 2.7.3. Also my Python commercial IDE (Wingware) defaults to Python 2.7.3.

How can I change my global Python default to be 3.2.3 instead of 2.7.3?

share|improve this question
    
In a terminal, you can just run python3. There's probably a setting somewhere for Wing. –  Thomas K Nov 11 '12 at 15:59
    
Yes python3 works fine from terminal. But I cannot seem to find the right path to the binary so that I can tell Wing to use it. I installed it with synaptic -any idea where it is? I am new to Linux. –  Vector Nov 12 '12 at 8:16
    
It should be /usr/bin/python3. –  Thomas K Nov 12 '12 at 13:07
    
Thanks - will check out. As I was reading this morning about Linux file system I figured that's where it would be. –  Vector Nov 12 '12 at 16:53
add comment

2 Answers 2

up vote 7 down vote accepted

Don't do it

Since many important programs are written in python changing default python may crash your system, so set python for individual apps. You can locate python3 at /usr/bin/python3 . If you want python3 by default try Ubuntu 12.10

share|improve this answer
    
Understood. python3 works fine from terminal. But I cannot seem to find the right path to the binary so that I can tell Wing to use it. I installed it with synaptic -any idea where it is? I am new to Linux. –  Vector Nov 12 '12 at 8:17
    
Sure?. I'm using 12.10 and python 2.7 seems to be the default. –  Javier Rivera Nov 12 '12 at 8:33
    
@Mikey: at /usr/bin/python3 –  Tachyons Nov 12 '12 at 9:38
    
@Javier Rivera: Strange!, Default python in 12.10 is python 3.2, Please recheck it :) –  Tachyons Nov 12 '12 at 9:40
1  
@Tachyons: There's no plan to make Python 3 run when you type python in a terminal. Even when Python 2 is dropped from the default installation (which hasn't happened yet), Python 3 will be python3. Debian & Ubuntu are playing it that way to avoid breaking things. –  Thomas K Nov 12 '12 at 13:09
show 4 more comments

I would not recommend overwriting the system python binaries.

I mainly use Perl and Perlbrew for testing code and new Perl releases.

You may want to check out something like Pythonbrew that will allow you to maintain your system Python while providing you a sandbox to play in with your newer distribution.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.