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 just installed Ubuntu 12.04 and Python 2.7 is pre-installed. I want also to have 3.2, and to be able to select one as the default with no arguments and the other to be specified by command line argument.

I guess I'm asking how to set environment variables analogous to PATH in Windows7, right?

N00b

share|improve this question

1 Answer 1

up vote 4 down vote accepted

It's impossible to use the command python using python3.2 because Ubuntu uses python2.7. You can try using #!/usr/bin/python3 in that first line of your python code to use python3.2.

To install python3.2 in Ubuntu:

Go to the console and put this:

sudo apt-get update && sudo apt-get install python3

After that, go to the console and enter python3. This will be python3.2 and python will be python 2.7.

share|improve this answer
    
Thank you very much!!! –  Joshua Cullick Jun 5 '12 at 5:32
    
sorry I hadn't gotten around to accepting the answer until today. i just received a notification that it was a notable question. strange, but okay! –  Joshua Cullick Jul 14 '13 at 9:29

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.