This simple tutorial shows how to install Python 3.13, which is still in development stage, in Ubuntu 22.04, or Ubuntu 20.04 LTS.
Python 3.13 so far is in alpha development stage. For testing or software developing purpose, you can install it in Ubuntu either from PPA or by building from source tarball.
Features in Python 3.13 so far, compare to the last 3.12:
The popular deadsnakes PPA has built the latest Python 3.13 alpha for current 2 Ubuntu LTS releases.
1. First, press Ctrl+Alt+T
on keyboard to open terminal. When it opens, run command to add the PPA:
sudo add-apt-repository ppa:deadsnakes/ppa
Type user password when it asks (no visual feedback) for sudo authentication and hit Enter to continue.
2. Then, install Python 3.13 by running command (Linux Mint needs to run sudo apt update
first to refresh package cache):
sudo apt install python3.13
For choice, replace python3.13
in command with python3.13-full
to also install GNU dbm database support, tkinter, as well as the IDE.
3. After installation, verify its version by running command:
python3.13 --version
4. To get pip package installer for Python3.13, just run the ensurepip
module which provides support for bootstrapping the pip installer into an existing Python installation.
python3.13 -m ensurepip --upgrade
Then verify via: python3.13 -m pip --version
, and upgrade it via python3.13 -m pip install --upgrade pip
.
1. First, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to install the required libraries for building Python:
sudo apt install wget build-essential libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
2. Then, select download the most recent dev version of Python 3.13 (so far Python-3.13.0a3.tar.xz
) from the link page below:
3. Next, extract the source tarball in file manager. Then, right-click on extracted folder and select “Open in terminal” to open that folder as working directory in terminal.
4. In the pop-up terminal, configure the source via command:
./configure --enable-optimizations
For choice, you can run ./configure --help
to print more configure options.
Then, compile by starting 4 threads in parallel:
make -j4
And finally install Python 3.13:
sudo make install
Finally, verify via command: python3.13 --version
and pip3.13 --version
.
For Python 3.13 installed from PPA, open terminal and run command to remove it:
sudo apt remove --autoremove python3.13
Also remove the PPA by running command:
sudo add-apt-repository --remove ppa:deadsnakes/ppa
If you compiled it from source, then try running the command below from source folder until you removed it:
sudo make uninstall
Or, manually delete all the corresponding files and folders (run whereis python3.13
to tell).
The post How to Install Python 3.13 (Dev) in Ubuntu 22.04 / 20.04 appeared first on Osgrove.
One of the most critical gaps in traditional Large Language Models (LLMs) is that they…
Canonical is continuously hiring new talent. Being a remote- first company, Canonical’s new joiners receive…
What is patching automation? With increasing numbers of vulnerabilities, there is a growing risk of…
Wouldn’t it be wonderful to wake up one day with a desire to explore AI…
Ubuntu and Ubuntu Pro supports Microsoft’s Azure Cobalt 100 Virtual Machines (VMs), powered by their…
Welcome to the Ubuntu Weekly Newsletter, Issue 870 for the week of December 8 –…