After consulting gemini.google.com, I ran this: sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update sudo apt install python3.11 I received message: python3.11 is already the latest version (3.11.9-1+jammy1) however: python3 --version returns: Python 3.10.12 Answer from neil on discuss.python.org
🌐
The Hitchhiker's Guide to Python
docs.python-guide.org › starting › install3 › linux
Installing Python 3 on Linux — The Hitchhiker's Guide to Python
If you’re using another version of Ubuntu (e.g. the latest LTS release) or you want to use a more current Python, we recommend using the deadsnakes PPA to install Python 3.8: $ sudo apt-get install software-properties-common $ sudo add-apt-repository ppa:deadsnakes/ppa $ sudo apt-get update $ sudo apt-get install python3.8 · If you are using other Linux distribution, chances are you already have Python 3 pre-installed as well.
🌐
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
Discussions

Installing python on Linux - help?
You should stick with your distros version and only do a manual installation if not possible otherwise. If you really need to do it, have a look here: https://aruljohn.com/blog/install-python-debian/ More on reddit.com
🌐 r/learnpython
16
9
May 26, 2024
How do I install python?
Chances are it's already installed. In terminal you can type python3 --version and it will tell you if it is installed already. More on reddit.com
🌐 r/Ubuntu
11
4
February 25, 2021
How to instala python on linux mint?
This is a Google question More on reddit.com
🌐 r/linuxquestions
9
0
February 10, 2024
Has anyone installed python-is-python3 on Ubuntu 20?
Seems stupid. Just alias python to python3, or run ln -s yourself. As far as I know, Ubuntu 20 doesn’t use python 2, so it shouldn’t break anything. More on reddit.com
🌐 r/linuxquestions
7
2
May 13, 2021
🌐
Python
python.org › downloads
Download Python | Python.org
Or get the standalone installer for Python 3.14.6 · Download Python 3.14.6 · Download Python 3.14.6 · Looking for Python with a different OS? Python for Windows, Linux/Unix, macOS, Android, iOS, other · Want to help test development versions of Python 3.15?
🌐
Reddit
reddit.com › r/learnpython › installing python on linux - help?
r/learnpython on Reddit: Installing python on Linux - help?
May 26, 2024 -

I am a long-time user of Python but I have never understood how to install python "properly" - I tend to figure out some way to get it done when I need to, and then forget all about it. But I want to understand it a bit better because it isn't straightforward in my opinion. I am not considering Pyenv or other such "helper" tools/dependencies - I want to learn how to do this the "official" way. I've looked at the official docs but can't see what I've done incorrectly. The main issue is that at some stage I often find myself wanting a newer version of python than what is provided, and then I end up a bit stuck.

I installed Debian and it came with python3 under my /usr/local/bin directory. There is also a Python installation under /usr/bin/python3.11, which I guess is my system python? I believe I was always interacting with my /usr/local/bin python - not the system python, so that's good. (Also I'm always using virtual environments, so let's not discuss their importance please). That was working fine for me, but now I want to upgrade my version of python and I am facing difficulties.

  • What should I do to upgrade python in an "official" way (i.e. not adding dev repositories like deadsnakes, not using helper tools like Pyenv)?

  • What do I need to do with pip? Currently, the pip command actually points to /usr/bin/python - i have to use pip3* (see below).

  • Can I simply delete the old python and pip versions from /usr/local/bin if I wanted to?

  • How do I ensure that every time I type python3 in the terminal, it grabs the latest one? Do I just ensure it is higher up in my PATH variable?

  • Why is there not one simple way to do this? Obviously everyone has slightly different needs, but I imagine 80% of python users just want to use python and have a reasonable way to upgrade when required without screwing something up in their system.

To explain why I'm asking this now, I installed the python source from the main website yesterday and tried to get it working but something is off. Here's what I did

  • Extracted the Python-3.12.3.tar.xz

  • Moved into the dir and ran ./configure --enable-optimizations --with-ensurepip=install

  • Ran make

  • Ran sudo make install

This worked, but I notice when I run python in the terminal REPL that I can't use the up/down keys to cycle through my command history:

>>> print("hello")
hello
>>> ^[[A

*Also, I notice that I now have pip (/usr/bin/python), pip3, and pip3.12 now, and I am confused about that. Should I alias pip with pip3.12 to prevent interacting with the system python? Should I just delete pip3 and make sure pip3 points to pip3.12?

These issues have convinced me that I've now installed python incorrectly somehow. I found some info about readline but that's deprecated, and I am starting to go down the rabbit hole of running random commands to try and fix things, which is probably going to make things worse.

🌐
GitHub
gist.github.com › alx-xlx › a1a878a7ea5271c3c44da3ca86b08a2b
Install Python3 in Windows/Linux · GitHub
Begin by using pip to install Pipenv and its dependencies, ... This will create two new files, Pipfile and Pipfile.lock, in your project directory, and a new virtual environment for your project if it doesn’t exist already.
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-install-python-on-linux
How to Install Python on Linux - GeeksforGeeks
July 12, 2025 - This comprehensive guide will walk you through the process of installing Python on your Linux system, covering everything from basic package management to advanced installation methods. ... Python 2: A legacy version no longer maintained. Avoid using it for new projects. Python 3: The actively ...
Find elsewhere
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_enterprise_linux › 9 › html › installing_and_using_dynamic_programming_languages › assembly_installing-and-using-python_installing-and-using-dynamic-programming-languages
Chapter 2. Installing and using Python | Installing and using dynamic programming languages | Red Hat Enterprise Linux | 9 | Red Hat Documentation
Packages prefixed with python3.12- ... Python 3.12. ... Additional Python tools for developers are distributed mostly through the CodeReady Linux Builder (CRB) repository. The python3-pytest package and its dependencies are available in the AppStream repository. The CRB repository contains, for example, the following packages: ... The content in the CodeReady Linux Builder repository is unsupported by Red Hat. ... Not all upstream Python-related packages are available in RHEL. To install packages from ...
🌐
nixCraft
cyberciti.biz › nixcraft › howto › python › how to install python on linux 2.x/3.x latest version
How To Install Python On Linux 2.x/3.x latest version - nixCraft
March 28, 2023 - We can pass the as follows on Linux and the nproc command returns the number of CPU cores available on your system: $ make -j $(nproc) Once compilation finished, install the Python on your system, run: $ sudo make altinstall That is all. Python 3.9.9 has been installed on your Linux system.
🌐
Python
docs.python.org › 3 › using › unix.html
2. Using Python on Unix platforms — Python 3.14.6 documentation
$ curl -O https://www.openssl.org/source/openssl-VERSION.tar.gz $ tar xzf openssl-VERSION $ pushd openssl-VERSION $ ./config \ --prefix=/usr/local/custom-openssl \ --libdir=lib \ --openssldir=/etc/ssl $ make -j1 depend $ make -j8 $ make install_sw $ popd · Build Python with custom OpenSSL (see the configure --with-openssl and --with-openssl-rpath options) $ pushd python-3.x.x $ ./configure -C \ --with-openssl=/usr/local/custom-openssl \ --with-openssl-rpath=auto \ --prefix=/usr/local/python-3.x.x $ make -j8 $ make altinstall
🌐
Medium
medium.com › pythoneers › installing-python-3-on-amazon-linux-with-openssl-and-pip-dependencies-2e9c76b91018
Installing Python 3 on Amazon Linux with OpenSSL and Pip Dependencies | by Rihem Larbi | The Pythoneers | Medium
July 22, 2024 - $ cd Python-3.12.2 $ sudo ./configure --with-openssl=/path/to/openssl11 $ sudo ./configure --enable-optimizations · PS: to get the path for openssl (“/path/to/openssl11”) you should run this command. ... Then you should compile the source and compile source as bellow. ... To simpify the installation and management of python packages you should install pip.
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-install-python-3-and-set-up-a-programming-environment-on-ubuntu-22-04
How To Install Python 3 and Set Up a Programming Environment on Ubuntu 22.04 | DigitalOcean
April 26, 2022 - This tutorial will get your Ubuntu 22.04 server set up with a Python 3 programming environment. Programming on a server has many advantages and supports collaboration across development projects. The general principles of this tutorial will apply to any distribution of Debian Linux.
🌐
Kbmisc
kbmisc.com › blog › install-python-on-ubuntu
How to Install Python 3 or Python 2 on Ubuntu 20.04 - Blog
See how to install Python 2.7 and/or Python 3 on Ubuntu 20.04 Linux via the command line with step by step instructions.
🌐
Kernel Talks
kerneltalks.com › home › software & tools › install python 3 on linux (redhat, centos, ubuntu)
Install Python 3 on Linux (Redhat, CentOS, Ubuntu) - Kernel Talks
June 25, 2020 - If not install package gcc before proceeding to the next step. root@kerneltalks # tar xf Python-3.6.3.tar.xz root@kerneltalks # cd Python-3.6.3 · Now its time to compile the source code. Execute configure script in Python-3.6.3 directory. root@kerneltalks # ./configure checking build system type... x86_64-pc-linux-gnu checking host system type...
🌐
Red Hat
developers.redhat.com › blog › install-python3-rhel
How to install multiple versions of Python on Red Hat Enterprise Linux | Red Hat Developer
February 27, 2024 - How to install Python 3 and other versions of Python that are supported by Red Hat using Red Hat Software Collections and Application Streams on Red Hat Enterprise Linux.
🌐
APXML
apxml.com › courses › python-for-beginners › chapter-1-getting-started-with-python › python-setup-linux
Install Python on Linux | Setup Guide
For Debian, Ubuntu, and derivatives (like Linux Mint): First, update your package list to ensure you get the latest available versions: ... sudo stands for "superuser do" and grants administrative privileges for the command that follows. You'll likely be prompted for your password. apt is the package manager. update refreshes the list of available packages. Install Python 3, pip (the Python package installer), and venv (for creating virtual environments):
🌐
Visual Studio Code
code.visualstudio.com › docs › python › python-tutorial
Getting Started with Python in VS Code
November 3, 2021 - The built-in Python 3 installation on Linux works well, but to install other Python packages you must install pip with get-pip.py.
🌐
DedicatedCore
dedicatedcore.com › home › how to install python 3 on ubuntu 20.04
How to Install Python 3 on Ubuntu 20.04 - DedicatedCore Blog
October 16, 2024 - It is sufficiently adaptable to be used in both web development and app creation. You may learn how to install Python 3.8 on Ubuntu 18.04 | 20.04 here. Before diving into managing versions of Python with Pyenv, it’s essential to first have Python 3 installed on your system, which is covered in another helpful guide.
🌐
Quora
quora.com › How-do-I-get-Python-3-on-Linux
How to get Python 3 on Linux - Quora
Answer (1 of 3): This describes how to install Python 3.6 or 3.8 on Ubuntu Linux machines. To see which version of Python 3 you have installed, open a command prompt and run [code]$ python3 --version [/code]If you are using Ubuntu 16.10 or newer, then you can easily install Python 3.6 with the...
🌐
First2Host
first2host.co.uk › home › linux
How To Install Python3 On Linux - First2Host
February 6, 2024 - Install Python3 on Linux by using the InLine Upstream repository. Here we install Python3 on RockyLinux and AlmaLinux Servers