Fixed with compiling python from source + adding the usr/local/bin to PATH and updating alternatives for python.

Answer from MIku on askubuntu.com
🌐
GitHub
gist.github.com › stas00 › d6851b7dc631c44fa273873d1332dc1e
Install Python 3.10.x on Ubuntu 20.04 · GitHub
sudo apt install python3.10 python3.10-venv python3.10-dev python3 --version · You will see previous of Python. At the writing time Python 3.8.10
Discussions

Install python 3.11.9 on ubuntu
According to this page: 'Python 3.11.9 is the newest major release of the Python programming language". Can I install Python 3.11.9 in my Virtual Machine? I have installed guest VM ubuntu-22.04.4-desktop-amd64.iso on a Windows 10 host. In the VM, I have run the following: sudo apt install sudo ... More on discuss.python.org
🌐 discuss.python.org
12
1
April 16, 2024
add python 3.10 on ubuntu - Stack Overflow
I'm just started using ubuntu and tried to upgrade python from 3.8.10 -> 3.10.4 in my venv with the following commands: sudo apt update && sudo apt upgrade -y sudo apt install software- More on stackoverflow.com
🌐 stackoverflow.com
Installing Python 3.10
Do you really need a full Ubuntu image? Ubuntu 20.04 uses Debian Bullseye (according to: https://askubuntu.com/a/445496/170138 ). I doubt there's anything you need from Ubuntu in a Docker container that's not in Debian. If Debian suffices, use python:3.10-bullseye and call it a day. More on reddit.com
🌐 r/learnpython
3
4
February 2, 2024
Upgrading Python 3.8 to 3.10 or higher on an older Ubuntu
i am running Xubuntu 20.04 and am not ready to upgrade to 24.04 just yet, but i would like to upgrade Python to run the latest version (above 3.8). can this be done? i want to have only one version of Python installed, if possible. how can i go about doing this? More on discourse.ubuntu.com
🌐 discourse.ubuntu.com
0
0
May 15, 2025
🌐
LinuxCapable
linuxcapable.com › home › ubuntu › how to install python 3.10 on ubuntu 26.04, 24.04 and 22.04
How to Install Python 3.10 on Ubuntu 26.04, 24.04 and 22.04 - LinuxCapable
May 11, 2026 - Python 3.10 introduced structural ... depend on. To install Python 3.10 on Ubuntu, use the default Ubuntu package on 22.04 LTS or the Deadsnakes PPA on 26.04 LTS and 24.04 LTS....
🌐
Python.org
discuss.python.org › python help
Install python 3.11.9 on ubuntu - Python Help - Discussions on Python.org
In the VM, I have run the following: sudo apt install sudo apt upgrade this: python3 --version returns: Python 3.10.12 When I run: sudo apt install python3 I receive this message: python3 is already at the newest version (3.10.6-1~22.04) When...
Published   April 16, 2024
🌐
CrownCloud Wiki
wiki.crowncloud.net
CrownCloud Wiki - How To Install Python 3 10 On Ubuntu 20 04=
cd Python-3.10.11 ./configure ... and the number 4 represents the number of CPU cores. ... Make install The default Python installation is /usr/bin....
Find elsewhere
🌐
Reddit
reddit.com › r/learnpython › installing python 3.10
r/learnpython on Reddit: Installing Python 3.10
February 2, 2024 -

Hi there,
I am working with a docker image created from ubuntu:20.04 base image.
At the moment we are installing python like this in the Dockerfile:

RUN apt-get install -y --no-install-recommends \
python3-dev \
python3-pip \
python3-venv \

The problem with this is that it installs Python v3.8. I need to install v3.10 and when I change the above command to install python3.10-dev, python3.10-pip and python3.10-venv - docker build fails saying:

#17 85.42 E: Unable to locate package python3.10-dev
17 85.42 E: Couldn't find any package by glob 'python3.10-dev'
17 85.42 E: Couldn't find any package by regex 'python3.10-dev'
17 85.42 E: Unable to locate package python3.10-venv
17 85.42 E: Couldn't find any package by glob 'python3.10-venv'
17 85.42 E: Couldn't find any package by regex 'python3.10-venv'

I have read online to add ppa:deadsnakes/ppa repo as a solution. But I am not sure if its safe to do so especially when there might be some corporate creds being accessed using the container.

Is there any other safe way to install python3.10 and other optional stuff?

Thanks

🌐
Python
python.org › downloads
Download Python | Python.org
Python 3.10.1 Dec. 6, 2021 Download Release notes · Python 3.10.0 Oct.
🌐
Ubuntu Community Hub
discourse.ubuntu.com › support and help
Upgrading Python 3.8 to 3.10 or higher on an older Ubuntu - Support and Help - Ubuntu Community Hub
May 15, 2025 - i am running Xubuntu 20.04 and am not ready to upgrade to 24.04 just yet, but i would like to upgrade Python to run the latest version (above 3.8). can this be done? i want to have only one version of Python installed,…
🌐
BitLaunch
bitlaunch.io › blog › how-to-install-python-on-ubuntu
7 Ways to Install and Manage Python and Python3 on Ubuntu
March 5, 2026 - Learn the best ways to install Python on Ubuntu, including how to install pip, pyenv, and Anaconda on Ubuntu to safely manage your Python 3 versions.
🌐
DEV Community
dev.to › shaikhalamin › python3-venev-setup-in-ubuntu-5ead
How to setup Python 3.10 or later, venv and pip setup in Ubuntu - DEV Community
October 28, 2024 - To Install python 3.10 or latest: sudo apt update sudo apt upgrade Enter... Tagged with python, pip, venv, ubuntu.
🌐
Python.org
discuss.python.org › python help
Unable to upgrade Python 3.8.10 to 3.10 - SOLVED - Python Help - Discussions on Python.org
May 15, 2022 - Hi, I tried to upgrade Python 3.8.10 to 3.10 on Ubuntu : Ubuntu 20.04.4 LTS but we hit a blocker and wondering whether anyone is able to upgrade it successfully. We basically followed the following page for instructions: When we reached 2nd command in Step 3: Add Python 3.8 & Python 3.10 to ...
🌐
Ultralytics
docs.ultralytics.com › ultralytics docs › home › quickstart
Install Ultralytics | Ultralytics Docs
November 12, 2023 - Install or update the ultralytics package using pip by running pip install -U ultralytics. For more details on the ultralytics package, visit the Python Package Index (PyPI).
🌐
LinuxBuzz
linuxbuzz.com › home › how to's › a quick guide on how to install python 3 on ubuntu 24.04
A Quick Guide on How to Install Python 3 on Ubuntu 24.04
July 22, 2024 - $ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 10 $ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.12 20 · To select the default Python version, run the following command: ... You’ll ...
🌐
JustAnswer
justanswer.com › computer › lake2-two-python-versions-3-9-3-10-linux-ubuntu.html
How to Install Python 3.9 and 3.10 on Ubuntu: Expert Q&A
February 18, 2023 - However, if I recall correctly, when I executed the command `sudo apt install python3.10-pip`, it indicated that there was no pip package available. Additionally, when I ran the command `python3.10 -m ensurepip`, it returned a message stating ...
🌐
Frappe
discuss.frappe.io › frappe framework
How to upgrade to python 3.10 - Frappe Framework - Frappe Forum
July 19, 2022 - ‼ Install custom PPA, so Ubuntu knows where to find python3.10: sudo apt install software-properties-common -y sudo add-apt-repository ppa:deadsnakes/ppa Install required python packages: sudo apt install python3.10 pytho...
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server
How To Install Python 3 and Set Up a Programming Environment on an Ubuntu Server | DigitalOcean
July 25, 2022 - This tutorial will get your Ubuntu server set up with a Python 3 programming environment. Programming on a server has many advantages and supports collaborat…
🌐
Quora
quora.com › When-I-tried-installing-Python-3-10-to-Ubuntu-22-04-LTS-I-got-errors-What-Linux-commands-do-I-have-to-use-to-download
When I tried installing Python 3.10 to Ubuntu 22.04 LTS, I got errors. What Linux commands do I have to use to download? - Quora
Answer: ### Shell environment set up for builds. ### You can now run 'bitbake ' Common targets are: core-image-minimal core-image-sato meta-toolchain meta-ide-support You can also run generated qemu images with a command like 'runqemu qemux86' root@purushotham-Inspiron-5502:/home/...
🌐
codingBites
codingbites.info › installing-python-310-pip-and-venv-on-ubuntu
How Do I Install Python 3.10 with a venv on Ubuntu? Answered.
June 23, 2023 - Step-by-step guide on installing Python 3.10, Pip, and Venv on Ubuntu. Learn how to set up your virtual python environment.