
The detected Python minor version is not compatible with the Python minor Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.7m.so (found suitable version "3.7.6", minimum required is "3")ĬMake Error at /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.13.2/shiboken_helpers.cmake:462 (message): In this tutorial, you have learned how to create a list of alternate Python versions for update-alternatives and set the default.Code: Select all - Found PythonInterp: /usr/bin/python3 (found suitable version "3.7.6", minimum required is "3") Now check the default Python version has changed: Type the number of the version you wish to set as the default and press ENTER. Sudo update-alternatives -config python There are 3 choices for the alternative python (providing /usr/bin/python). Now you can change the default version of Python using the following command: Note - the number at the end of each command is the priority number. Update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in auto mode Update-alternatives: using /usr/bin/python3.9 to provide /usr/bin/python (python) in auto mode Sudo update-alternatives -install /usr/bin/python python /usr/bin/python3.6 1 sudo update-alternatives -install /usr/bin/python python /usr/bin/python3.9 2 sudo update-alternatives -install /usr/bin/python python /usr/bin/python2.7 3 update-alternatives: using /usr/bin/python3.6 to provide /usr/bin/python (python) in auto mode Now run the following commands changing the version numbers to suit what you have.

You may also want to list Python 2.* versions if you want to add one of them as an option: Start by listing all the installed versions of Python 3 so you can choose the version options to add. To update Python to the latest version installed on your system, we can use update-alternatives to change the python shortcut command to point to Python 3.9.īefore we do this, we need to add Python 3.9 as an option in update-alternatives.

If you have followed my article on how to install Python 3.9 on Ubuntu, you will notice that 3.9 is not the version used when running the following command: In this article, we will learn how to change the default Python version so that it can be used without explicitly typing a version number.

After installing the latest version of Python 3 on your system, you will notice that an older version is still used when executing Python VIA the python and python3 commands.
