Debian 10 - How to upgrade python 3.7 to python 3.9

I have covered this a number of times in the past and the posts have proved popular and useful to many. So, here is my guide for updating to the latest version of Python 3 (3.9) on Debian 10 Buster. To clarify the purpose of this guide, Debian 10 ships with Python 2 (2.7) and Python 3 (3.7) installed at my time of writing. For those wishing to upgrade from python 3.7.X to 3.8.X or 3.9.X, this is the guide for you. If you are trying to configure python 3.7 as your default interpreter when you call ‘python‘, try this: CHANGING THE DEFAULT PYTHON VERSION IN DEBIAN. This method involves using the ‘update-alternatives‘ command. We will be using a similar method in this guide, however this time we only do so to give 3.9.X a higher priority to 3.7.X, rather than uninstalling older versions. ...

January 5, 2021 · 3 min · Tom

Changing the default python version in Debian

In a previous post, I explained how to upgrade from Python3.5 to Python3.7, however is is still the case in most fresh Debian installs that the default python version is 2.7. This post is going to show you the simple steps you need to take when changing the default python version in Debian. This guide is based on a Debian 9 installation, but work for multiple releases. Check you default version First we need to check our current default version of python. This is the version of python that you Debian OS will try to execute python scripts with unless otherwise specified. ...

June 17, 2019 · 2 min · Tom

Debian 9 - Running a python script at boot

Note: Debian 9 is end-of-life, but the crontab @reboot technique shown here works on all modern Debian, Ubuntu, and Raspberry Pi OS releases. There are a number of ways that you can run a python or bash script at system start but I am about to show you possibly the easiest way, using crontab. First you need to make that your script is executable and can run unattended. Then you need to login as the user your wish to execute the script as and edit the crontab file: ...

February 21, 2019 · 1 min · Tom

Debian 9 - How to upgrade python 3.5 to python 3.7

Note: Debian 9 Stretch reached end-of-life in June 2022. The compile-from-source method shown here is still valid on any current Debian or Ubuntu system — just substitute the Python version you need. I recently spent 30 minutes figuring out how to upgrade to python 3.7 and subsequently pip version on a fresh install of Debian 9. I ran into a number of issues doing this so I though that I would put this quick post together to make this a little bit less complicated for anyone else trying to this. ...

February 19, 2019 · 3 min · Tom