I can access Python 3 via
python3 command. But I want to make the default interpreter to use
python command for Python 3. Simple typing
python takes me to Python 2. How to upgrade?
A simple safety way would be to use an alias, by placing:
You can use
This answer Is a good example for how to set things up for simultaneously maintaining different versions of gcc/g++, for example.
just do the same with python2.7 and python 3.3
[Update: This is the wrong way, I have learned, since Python-2 and Python-3 are not really interchangeable.]
You can try the command line tool
If you get the error "no alternatives for python" then set up an alternative yourself with the following command:
Change the path
From the Ubuntu wiki:
It is not recommended to change the symbolic link because of other package dependencies, but they "have ongoing project goals to make Python 3 the default, preferred Python version in the distros".
For CLI use, like @Radu Rădeanu, I would recommend putting an alias in the user's
Scripts can then start with something like:
I would still recommend using