How to make Ubuntu 18.04 LTS use python 3.7 as default?
Bo Berglund
bo.berglund at gmail.com
Thu Jul 30 06:15:39 UTC 2020
I have an Ubuntu 18.04 LTS server, which started as a 16.04 LTS box
but was upgraded to 18.04 last year via the function to do such
upgrades.
It is used as a Subversion backup server and also as a webserver for
private use.
It has python 2.7 installed as its default python and now I am getting
problems because apparently 2.7 is no longer the version used for some
of my tools, which prints messages that all upgrades must use python 3
(actually 3.5 or higher).
I have managed to install 3.7 even though the ubuntu apt system only
provides a much lower version.
I did that using this instruction page:
https://linuxize.com/post/how-to-install-python-3-7-on-ubuntu-18-04/
So now I have this:
~$ python --version
Python 2.7.17
~$ python2 --version
Python 2.7.17
~$ python3 --version
Python 3.6.9
~$ python3.7 --version
Python 3.7.8
As you can see I seem to have 3 installed versions but the default
version is the oldest...
So how can I make python use version 3 (or even 3.7.8)?
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list