3

I've just now installed Python 3.7 and I'd like to understand why I get the following output from bash:

g-luca@hp-notebook:~$ python3.7 -V
Python 3.7.0
g-luca@hp-notebook:~$ python3 -V
Python 3.5.2
g-luca@hp-notebook:~$ python -V
Python 2.7.12
wjandrea
  • 14,504
glc78
  • 491

1 Answers1

2

You need to check which symlinks are in place. The Python binaries are located in the directory /usr/bin (check with which pythonX.Y). The python3 symlink points to the python3.5 binary.

As mentioned in the comments: if you don't want to type python3.7 every time you shouldn't change the symlink. Changing the Python version might brake system stuff in unexpected ways. You should rather create an alias in your shell. In Bash you would add something like alias python=python3.7 into ~/.bashrc.

Sethos II
  • 541