I've recently installed linux and got it working as a dual boot on my laptop. I have both python 2.7 and python 3.3 installed on my system.
The problem is that when I run python
it runs the python 2.7 interpreter rather than python 3.3 as I would like it to. I can run the 3.3 interpreter with python3.3
but I would rather run the latest version with the shorter command, however I don't know how to change this. Any help regarding this would be most appreciated.
Asked
Active
Viewed 448 times
1

user163911
- 169
- 1
- 4
- 13
-
That might not be a good idea because it could break a lot of other scripts. – Keith Jan 27 '14 at 00:16
1 Answers
1
There are multiple ways to change what python
gets you, one of the safer ways to get python3.3
is to use an alias described here. You may want to alias python
to python3
as that should give you 3.3 now, and 3.4 when you upgrade in the future.
If you want to update the default systemwide, you can try:
sudo update-alternatives --config python
as mentioned elsewhere.
Edit: Please note that various operating systems integrate a specific version of python and various updates and packages may break if python
doesn't work exactly as expected. There are, of course, many ways to handle python versions (use of python3
on the command line, virtualenv, pythonbrew, to name some of them).

Community
- 1
- 1

Noah Hafner
- 341
- 2
- 5
-
I don't think I did everything correctly but I did eventually get the system to recognise `python` as `python3.3` though I'm buggered if I know how :P – user163911 Jan 27 '14 at 13:50