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?
Best Answer
It's impossible to use the command python using
python3.2
because Ubuntu usespython2.7
. You can try using#!/usr/bin/python3
in that first line of your python code to usepython3.2
.To install
python3.2
in Ubuntu:Go to the console and put this:
After that, go to the console and enter
python3
. This will bepython3.2
andpython
will bepython 2.7
.