building python 3.13.0 beta 1 on linux mint 21.3

Python 3.13.0 Beta 1 was released Wednesday 8 May by the Python Foundation (see link to announcement below). I downloaded the sources and built it. Here’s what I did to set up for this beta release.

Install Build Prerequisites

You need to install the following packages in order to build every module in Python. There is one additional package dependency that Python 3.13 will need to build, and it’s libmpdec-dev. Every other Python version prior to 3.13 did not need this package installed.

sudo apt install zlib1g-dev \libncurses5-dev \libgdbm-dev \libnss3-dev \libssl-dev \libreadline-dev \libffi-dev \libsqlite3-dev \libbz2-dev \tk \tk-dev \liblzma-dev \libgdbm-compat-dev \libmpdec-dev

Build And Install Python 3.13.0 Beta 1

  • Download the latest Python version from https://www.python.org/downloads/
  • Untar the file into a work folder of your choice
  • Make a build directory at the same level as the untarred source directory.
  • From within the build directory execute the configure script. In this example we’re building Python 3.13.0b1.
    ../Python-3.13.0b1/configure --enable-optimizations
  • Within the build directory run make.
  • Install into the alternate location for this version of Python:
    sudo -H make altinstall
  • Check for the alternate location with which python3.13 . It should return /usr/local/bin/python3.13 .

Create A Virtual Work Environment

  • In your home directory create a work folder. On my system I named it ‘VPython’, but you can call it whatever you want.
  • Change directory into it, then create a Python virtual environment using, as an example, python3.13 -m venv 313.
  • There is a bin directory in the virtual directory you created, which in this example was 313. Start the environment with source 313/bin/activate .

I created an alias so that typing 313 in any shell starts the environment. The alias should source the full path and the script in the virtual environment’s bin directory. When active, typing deactivate drops you back to a regular shell environment. See the following screen capture.

Python 3.13.0 beta 1 screen capture

Note that there are new, and significant, changes coming to Python via version 3.13. The screen capture hints at just several of the new features, colorization and much better error reporting in the REPL. Note also that you no longer have to type exit() as a function to exit the REPL. It appears that Python is adding massive quality-of-life upgrades, starting with 3.13.

Announcement: https://pythoninsider.blogspot.com/2024/05/python-3130-beta-1-released.html

rhel 9.4 is generally available — my thoughts

RHEL 9.4 running as a QEMU/KVM VM

While the majority of the stories about newly released Linux distributions have centered around Fedora 40 and Ubuntu 24.04, Red Hat released Enterprise Linux (RHEL) 9.4 on May 1st. As a RHEL developer I keep a VM running the latest release so I can stay familiar with RHEL in general as well as the tools that come bundled with RHEL. There’s a link at the bottom to the complete what’s new about RHEL 9.4, so I won’t go into breathless detail when you can get the straight scoop from Red Hat. But I am going to comment on some of the tools and the versions they released.

Tools In General

Python 3.12, Ruby 3.3, and PostgreSQL 16 are all great versions; that’s what their current major release levels are. Unfortunately when I updated my RHEL 9.3 instance to RHEL 9.4, I didn’t pick up the latest advertised tools. Instead I’m still at Python 3.9, Ruby 3.0, and PostgreSQL 13.

Other tools advertised with this release were Rust 1.75, Go 1.21, and LLVM 17. The current releases of those tools are Rust 1.78, Go 1.22.2, and LLVM 18. I should point out that Rust 1.78 now requires LLVM 18 as its back-end machine assembler. I should also point out that if you’re contemplating writing Rust drivers for the Linux kernel, 6.8 and later, that you’ll need Rust 1.77 at a minimum as well as a distribution that is running Linux kernel 6.8 or later. Unfortunately RHEL 9.x isn’t one of those distributions as it’s running a version 5 Linux kernel.

I suppose that if I were to perform a clean install of RHEL 9.4 I might actually get the updated tools, but performing an update to RHEL 9.4 from an earlier release, such as I did from 9.3, won’t get you there.

Clang

RHEL 9.4 Clang 17 installation

Clang, the C/C++ language front end for LLVM, isn’t installed by default, but you can install it after installing RHEL. In this instance it’s one major release behind current Clang, which is version 18. If I were to choose between GCC and Clang I believe I’d choose Clang, if for no other reason than GCC is relatively old compared with Clang, and Clang 17 has solid C++ 17 compliance, as well as C++ 20 and C++ 23.

Final Thoughts

RHEL is an IBM company, and it’s beginning to really “smell” like an IBM company that is catering to Big Businesses that use Linux in their businesses. If you work for such a company then RHEL will suit you just fine. If you’re into being more up-to-date with tooling and the latest Linux infrastructure such as the kernel, or if you’re doing kernel development, then I would recommend you use the latest Fedora, Linux Mint, or Ubuntu distributions. I personally use Linux Mint 21.3 with the Linux kernel 6.5 as my daily driver, Ubuntu 23.10 on my Raspberry Pi 5 and Fedora 40 (the latest) on my 2010 Samsung notebook. I’d like to point out that a fourteen year old computer is running one of the latest Linux distributions; with Linux there never truly is an obsolete (Apple calls them “legacy”) computer.

Links

What’s new in Red Hat Enterprise Linux 9.4? — https://developers.redhat.com/articles/2024/05/01/whats-new-red-hat-enterprise-linux-94#

Why I Maintain A RHEL 9.x VM

In the past I have been called upon to work in a RHEL environment, going all the way back to RHEL 5. It therefore behooves me to keep an up-to-date installation so I can remain familiar with the product. As a retired engineer and a consultant, I maintain that I will only work on the latest RHEL release; at this point in time that is RHEL 9, which was initially released in May 2022. Before then it was RHEL 8. Since it’s now a solid two years since RHEL 9’s initial release I believe there’s no excuse not to be running your business on RHEL 9. There are all sorts of excuses why a business refuses to update, but in the end none of them are good. I have turned down work because of the older RHEL releases someone may be using. It’s just not worth the aggravation; no amount of money will make me change my mind.