In the course of building out a small program the other day, I realized that my version of Python was lagging behind.
python -V Python 3.8.17
I’m running Pop! OS 22.04, the latest version of Pop! for a while. Pop! currently uses Gnome with add-ins to customize the interface and deliver the tiled experience that Pop! is known for. Extensions have been a bugaboo for Gome for a long time (although recently - 2023 - they’ve gotten better, but I understand Gnome 45 breaks them all again). Word trickled out that System 76 had difficulties in working with the Gnome team as well. In 2022, System 76 decided to pursue their own Rust-based desktop environment as a replacement for Gnome. In order to free up resources, they decided to maintain 22.04 and to not build interim releases.
Despite the fact that I’ve been running the same release for a couple years, Pop! continues to be my favorite experience. System 76 has pushed updates out and I’ve commented several times that the kernel is fresh and the components are kept current so Pop! still feels like a good place. I’ve historically been a hopper and staying on one distro for a prolonged period of time is a change. That said, finding out Python was several versions behind was a moment.
I’m very interested in Nix, as an aside. I’ve got Nix installed on a laptop and loaded the System 76 tiling extension. Nix has a lot going for it, but I’m still try to learn flakes and Home Manager and don’t feel ready to put this on my main device. The laptop is a place I can “burn and rebuild”. Still, if I start hopping again, it will be to go to Nix.
I used python -V or python –version to determine my current version. To move to the latest Python, 3.10, I added the PPA for Python.
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update sudo apt install python3.10
you can check this by looking at the installed packages.
apt list | grep python
At this point, both 3.8 and 3.10 were installed on my system. I used sudo update-alternatives –config python3 to select the version that I wanted to use by default. Running the command will show you a list of python installs and allow you to select one. Using update-alternatives instead of deleting Python 3.8 maintains the old version for any dependencies. When I used it, I found I had a copy of miniconda that I no longer needed and I ended up uninstalling it.
I also like to be able to type python3 or just python. To set that up, I added an alias as well.
alias python /usr/bin/python3.10
So now I’m up to date!
You may also need to update PIP.
python3.10 -m pip install --upgrade pip