2

I installed python3.5.2 on my Ubuntu 19.04 for some reason, and now I want to make the python3.7 the default for python3 command on terminal and even remove the 3.5.2 version from my system. The installation process of 3.5.2 was manual, and there is not a python3.5.2 in /usr/bin directory:

$ ls /usr/bin/python*

lrwxrwxrwx 1 root root       7 Mar  4 19:18 /usr/bin/python -> python2
lrwxrwxrwx 1 root root       9 Mar  4 19:18 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 3691008 Apr  6 06:12 /usr/bin/python2.7
lrwxrwxrwx 1 root root      33 Apr  6 06:12 /usr/bin/python2.7-config -> x86_64-linux-gnu-python2.7-config
lrwxrwxrwx 1 root root      16 Mar  4 19:18 /usr/bin/python2-config -> python2.7-config
lrwxrwxrwx 1 root root      25 Jun 11 10:25 /usr/bin/python3 -> /etc/alternatives/python3
-rwxr-xr-x 2 root root 4877888 Apr  3 10:09 /usr/bin/python3.7
lrwxrwxrwx 1 root root      33 Apr  3 10:09 /usr/bin/python3.7-config -> x86_64-linux-gnu-python3.7-config
-rwxr-xr-x 2 root root 4877888 Apr  3 10:09 /usr/bin/python3.7m
lrwxrwxrwx 1 root root      34 Apr  3 10:09 /usr/bin/python3.7m-config -> x86_64-linux-gnu-python3.7m-config
lrwxrwxrwx 1 root root      16 Mar 26 14:55 /usr/bin/python3-config -> python3.7-config
lrwxrwxrwx 1 root root      10 Mar 26 14:55 /usr/bin/python3m -> python3.7m
lrwxrwxrwx 1 root root      17 Mar 26 14:55 /usr/bin/python3m-config -> python3.7m-config
lrwxrwxrwx 1 root root      14 Mar  4 19:18 /usr/bin/python-config -> python2-config


$ python3.7 -V
Python 3.7.3

$ python3.5 -V
Python 3.5.2

$ python3 -V
Python 3.5.2

Some other functionalities in the system are broken too. For example, when I use jupyter notebook it uses python3.5.2 as its kernel and it doesn't recognize the libraries I've installed for the 3.7 version. So how can I restore the python version to the Ubuntu 19.04 default?

0 Answers0