The correct way is sudo apt install python-is-python3 - it effectively does a symlink, but it also keeps pace with future updates; so if your ubuntu distribution moves to say Python 3.9, the manual symlink will no longer work, but the package makes sure it is still valid.

Answer from volferine on askubuntu.com
Discussions

python - Permanently change the default Python3 version in Linux (Ubuntu on Windows) - Stack Overflow
This works: alias python='/usr... --version is Python 3.9.5 - but only temporarily, as upon closing and reopening Ubuntu it reverts to Python 3.8.10. I then tried creating a permanent alias by adding that same line to my .bashrc script (I followed these steps), and the same thing happened. ... How can I change the default Python 3.8 ... More on stackoverflow.com
🌐 stackoverflow.com
How to change Python and Pip version in Ubuntu
You shouldn’t tamper with the system installation of python and there really isn’t a way to “change the defaults” globally. You should look into virtual environments: https://docs.python.org/3/library/venv.html In short, create a virtual environment based on the global 3.9 installation and once activated it would point python to python3.9 for you until you deactivate it. More on reddit.com
🌐 r/bashonubuntuonwindows
11
14
January 17, 2021
python3 - Change the Python default version in Ubuntu - Unix & Linux Stack Exchange
I have installed python 3.10 on my Ubuntu. Now I have there two versions: 3.8 and 3.10. I would like to set Python 3.10 as a default. I followed the advice here: Change the Python3 default version in More on unix.stackexchange.com
🌐 unix.stackexchange.com
January 26, 2022
How can I change the default version of Python in Linux Ubuntu 14.04?
Robert Skoubo is having issues with: I use Ubuntu on one laptop to do my programming and my Windows 8.1 laptop to watch the videos. When I open the command line on the Ubuntu system... More on teamtreehouse.com
🌐 teamtreehouse.com
2
April 29, 2015
🌐
KarChunT
karchunt.com › blog › setup-default-python-version-on-ubuntu
Setup Default Python Version on Ubuntu | KarChunT
October 18, 2025 - Then, you can set the default Python version using the update-alternatives command. The higher the priority value, the higher the priority of that version. sudo update-alternatives --install /usr/bin/python3 python3 <replace-your-path> ...
🌐
MIT
web.mit.edu › 6.00 › www › handouts › pybuntu.html
Changing Default Python on Ubuntu
Setting python 2.6 as default on Linux · If you have a later version than 2.6 you'll need to set 2.6 as the default Python. Later versions would be 2.7 and 3.1; see what you have by typing python -V at the terminal. For purposes of this example we'll assume you have 3.1 installed.
🌐
RoseHosting
rosehosting.com › home › how to install and switch python versions on ubuntu 20.04
How to Install and Switch Python Versions on Ubuntu 20.04 | RoseHosting
October 5, 2022 - This is the main purpose of the tutorial, to have multiple Python versions on a single system and have choices before creating the virtual environments or changing the default Python version. In the next steps, first we are going to install the default Python version in Ubuntu 20.04, and then ...
Find elsewhere
🌐
YouTube
youtube.com › watch
How to Change Default Python3 Version on Linux | Change default Python3 Version on Ubuntu - YouTube
How to Change Default Python Version on Linux | Change default Python3 Version on UbuntuIf you want to change the version of Python that is associated with t...
Published   June 3, 2023
🌐
Baeldung
baeldung.com › home › administration › setting the default python to python3
Setting the Default python to python3 | Baeldung on Linux
May 7, 2025 - In this tutorial, let’s look at how to set the default Python in our system based on our preferred Python version. Most Linux distros usually have the latest stable release of Python included as the default, and in older systems, the deprecated Python2.* is the default. We’ll see how we can change the default Python using the alias and update-alternatives commands.
🌐
Stack Exchange
unix.stackexchange.com › questions › 687984 › change-the-python-default-version-in-ubuntu
python3 - Change the Python default version in Ubuntu - Unix & Linux Stack Exchange
January 26, 2022 - I have installed python 3.10 on my Ubuntu. Now I have there two versions: 3.8 and 3.10. I would like to set Python 3.10 as a default. I followed the advice here: Change the Python3 default version in Ubuntu
🌐
Super User
superuser.com › questions › 608937 › setting-default-python-version-in-ubuntu
setting default python version in ubuntu - Super User
June 17, 2013 - tracked.py -V $PYTHON_VERSION -v \&\&\' && pycompile synthetic_data.py ... tracked.py -V $PYTHON_VERSION -v && sleep .001 && # Sorry cant remember why, wouldnt surprise me not existing reason at all rm python_version.foo && echo 'Compilation batchjob completed successfully' If this does not show the big picture then just think about how to make programs that behave according to what interpreters does each particular host have. This is somewhat old software, nowadays i would have done it asking for mktemp when using foofiles. God help me now. ... Instead of re-mapping internal python dependencies, change it temporarily and run the commands.
🌐
OperaVPS
operavps.com › docs › how to change python default version in debian/ubuntu
How to Change Python Default Version in Debian/Ubuntu
February 12, 2026 - By using the update-alternatives command, you can prioritize the executable Python, and the version that has a high priority is set as the default version. By running the python -V command, the available version of Python will be displayed. ...
🌐
TecAdmin
tecadmin.net › how-to-switch-python-version-in-ubuntu-debian
How to Change Default Python Version on Ubuntu & Debian
April 26, 2025 - Create a symbolic link from /usr/bin/python2.7 to /usr/bin/python and set the group name as “python”. This group name will be used to switch versions later. sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 · ...
🌐
Quora
quora.com › How-do-I-change-from-default-to-an-alternative-Python-version-on-Linux
How to change from default to an alternative Python version on Linux - Quora
pyenv manipulates PATH so the selected Python becomes default for that user/scope without touching system packages. ... Use pip to install packages. Deactivates to return to system Python. 2) update-alternatives (Debian/Ubuntu; system-wide, controlled) Install target Python packages from distro or deadsnakes PPA: sudo add-apt-repository ppa:deadsnakes/ppa && sudo apt update · sudo apt install python3.11 python3.9 (or desired versions) ... Choose the desired candidate. Note: Changing /usr/bin/python may break system scripts expecting a specific Python version; prefer leaving /usr/bin/python3 alone and only use update-alternatives for /usr/bin/python if you understand distro implications.
🌐
DEV Community
dev.to › meetsohail › change-the-python3-default-version-in-ubuntu-1ekb
Change the Python3 default Version in Ubuntu - DEV Community
November 8, 2020 - After research, I am come up with an easy solution to set python3 as a default on the ubuntu system. Check python version on terminal - python --version
🌐
LinuxConfig
linuxconfig.org › home › how to change from default to alternative python version on debian linux
How to change from default to alternative Python version on Debian Linux
December 7, 2023 - Open ~/.bashrc file and add new alias to change your default python executable: ... To change python version system-wide we can use update-alternatives python command.
🌐
Asma's Blog
asmak9.com › 2026 › 04 › how-to-change-default-python-version-in.html
How to Change Default Python Version in Ubuntu - A Step-by-Step Guide for 2026 - Asma's Blog
My provided solution contains Ubuntu environment shell script for installing & changing python version using pyenv library along with windows powershell script file for downloading the missing require certificates for pyenv python library installation.
🌐
Medium
alluaravind1313.medium.com › make-python3-as-default-in-ubuntu-machine-572431b69094
Make Python3 as Default in Ubuntu Machine - ARAVIND ALLU - Medium
March 15, 2021 - Make Python3 as Default in Ubuntu Machine Install Python from the official Python-website. Before making the changes, we need to check the default version of python in the machine by using the …