0

I'm trying to set python 3.6 as default (instead of python 3.8)

The output of: update-alternatives --list python :

/usr/bin/python3.6
/usr/bin/python3.8

the output of update-alternatives --config python:

There are 2 choices for the alternative python (providing /usr/bin/python).



 Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /usr/bin/python3.6   1         auto mode
  1            /usr/bin/python3.6   1         manual mode
  2            /usr/bin/python3.8   1         manual mode

the output of python --version :

Python 3.8.8

Why the default version is 3.8 and not 3.6 ? what can I do ?

user3668129
  • 4,318
  • 6
  • 45
  • 87

1 Answers1

0

update-alternatives manages symbolic links inside the /etc/alternatives. To make it work, the executable you are calling must be a symlink pointing into the /etc/alternatives directory. Please check that.

For example:

/usr/bin/java -> /etc/alternatives/java

and after that the exact java version can be managed with update-alternatives:

/etc/alternatives/java -> /usr/lib/jvm/java-11-openjdk-11.....x86_64/bin/java
VPfB
  • 14,927
  • 6
  • 41
  • 75