Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am in the processing learning python. I was previously learning in Python. I used version 3. Today, I installed Xubuntu 13.04. I am a very new Xubuntu user. The os had two versions pre installed. 2.7.4 and 3.3. When I type python in the console, v2.7.4 opens up. How do I change that to v3.3?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

To run Python 3, use the python3 command. To set Python 3 as default, add a symlink to /usr/local/bin as root:

sudo ln -s /usr/bin/python3 /usr/local/bin/python

After doing that, you can still execute Python 2 with python2 or python2.7.

share|improve this answer
    
Thank you. It worked. I have also made it the default. –  Vignesh Palani Aug 15 '13 at 13:02
add comment

Type python3 instead of simply python. Python runs 2.x, whereas python3 runs 3.x

share|improve this answer
    
Thank you. It worked. –  Vignesh Palani Aug 15 '13 at 13:02
add comment

The Debian way typically involves using update-alternatives

So for Python:

sudo update-alternatives --config python

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.