The debian I am using has its default python3 -> 3.7.3.
Then I successfully installed the python3 version 3.7.4, which is a dedicated version I prefer to.
But now, the python version goes to mess.
Here is the detailed info from terminal commands
- python3 –version
–> Python 3.7.4 - /usr/bin/python3 — version
–> Python 3.7.3 - /usr/bin/python3.7 — version
–> Python 3.7.3
So how can I align it with "Python 3.7.4"?
2
Answers
If you have a look into
/usr/bin
, you will see, that you’ll have many different executables for different python versions, e.g.python2.7
,python3.7.3
,python3.7.4
, etc.To give users the security of a known environment, you’ll also find symbolic links, e.g.
So in the example the commands
python
andpython2
will both executepython2.7
. Callingpython3
will actually executepython3.5
.I usually change those symbolic links to fit my needs (you might need root rights). For example, I usually want the command
python
to run the currentpython3
version:Why calling
python3 --version
results in version 3.7.4 must further be examined:which python3
show?alias python="/usr/bin/python3.7.4"
in your.bashrc
file)What AnsFourtyTwo said is correct, but if you need to manage multiple Python versions, try to use pyenv.
It’s a tool that lets to manage multiple Python versions (and implementations) on your machine and switch between them easily so that you won’t have to change the links manually.
It’s similar to nvm (Node.js version manager).