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/ Answer from sgunb on reddit.com
🌐
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. If not, use your distribution’s package manager. For example on Fedora, you would use dnf:
🌐
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.

where to install my python project in linux May 5, 2022
r/linuxquestions
4y ago
Using Python on LINUX Dec 25, 2018
r/learnpython
7y ago
Struggling to install python Aug 27, 2025
r/linux4noobs
10mo ago
How to install Python on Ubuntu? Mar 28, 2021
r/Ubuntu
5y ago
More results from reddit.com
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
Recommended way to install a Python package system-wide on Linux - Packaging - Discussions on Python.org
For decades, the canonical way to install a Python package system wide has been python setup.py install On most Linux systems this would install the package in the site-packages directory below /usr/local. Just like any other typical non-package-manager install. More on discuss.python.org
🌐 discuss.python.org
0
May 20, 2022
How to instala python on linux mint?
This is a Google question More on reddit.com
🌐 r/linuxquestions
9
0
February 10, 2024
Best way to install and maanage Python libraries in Linux?
Do not install python packages as system packages, it's madness. You should use pip. Depending on how much/what you use python for, you should consider using a virtualenv tailored to the things you're using python with. A virtualenv is just a directory that has the python binaries and libraries, plus any python packages you install into it. You can have as many as you want, so if you have multiple programs with different or conflicting dependencies you can keep them separate. Even using the system python is sometimes not a good idea - they're usually not particularly up to date. I usually install pyenv and then use that to manage python versions. More on reddit.com
🌐 r/learnpython
18
1
April 27, 2023
🌐
Python
docs.python.org › 3 › using › unix.html
2. Using Python on Unix platforms — Python 3.14.6 documentation
You will also need to install the build requirements. ... Configuration options and caveats for specific Unix platforms are extensively documented in the README.rst file in the root of the Python source tree. ... make install can overwrite or masquerade the python3 binary. make altinstall is therefore recommended instead of make install since it only installs exec_prefix/bin/pythonversion.
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-install-python-on-linux
How to Install Python on Linux - GeeksforGeeks
January 14, 2020 - Python can be installed on Linux using package managers, version managers, or by building it from source. Most Linux distributions already include Python, but installing the latest version ensures access to new features, performance improvements, ...
🌐
Alessio Ligabue
alessioligabue.it › en › blog › install-python-complete-guide
Complete Guide to Installing Python on Linux (2026)
January 29, 2026 - You may receive an output such as Python 3.10.12. If the command returns an error, it means Python 3 is not installed or is not in the system PATH. The easiest and safest way to install software on Linux is to use your distribution's package manager.
Address   13 Via Ca Marastoni, 42122, Reggio Emilia
🌐
Real Python
realpython.com › installing-python
How to Install Python on Your System: A Guide – Real Python
February 18, 2026 - You can install Python on Windows using the official installer from Python.org or through the Microsoft Store. On macOS, you can use the official installer or Homebrew. For Linux, use your package manager or build Python from source.
Find elsewhere
🌐
Python
python.org › downloads
Download Python | Python.org
For most Unix systems, you must download and compile the source code. The same source code archive can also be used to build the Windows and Mac versions, and is the starting point for ports to all other platforms.
🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › software & applications
Python install - Linux Mint Forums
March 20, 2024 - Creating a python environment, as has been posted here, is the best way. You can control things without breaking the system. Create a requirements.txt file to reflect what packages your project needs. ... I wound up just installing the pycharm IDE. I noticed the version number was 3.10 the same as on Mint.
🌐
Talkpython
training.talkpython.fm › installing-python
Install Python on Windows, macOS & Linux @ Talk Python
2 weeks ago - tl;dr; To install Python 3.14 on Windows, macOS, or Linux, you run two commands: first install uv, then run uv python install 3.14 --default. That's the whole process - no installer wizard, no decision tree, no editing your PATH, and the same two steps on every operating system.
🌐
Computing
pages.github.nceas.ucsb.edu › NCEAS › Computing › local_install_python_on_a_server.html
Installation of Python in your home directory (without sudo rights) | Computing
Create a virtual environement using the local installation: virtualenv virtalenv_name -p /home/<username>/.localpython/bin/python2.7 · Use the virutal env.: source ~/virtualenv-1.9/virtalenv_name/bin/activate ... http://opensourcehacker.com/2012/09/16/recommended-way-for-sudo-free-installation-of-python-software-with-virtualenv/
🌐
GitHub
gist.github.com › MichaelCurrin › 57d70f6aaba1b2b9f8a834ca5dd19a59
Install Python on Linux distros · GitHub
Save MichaelCurrin/57d70f6aaba1b2b9f8a834ca5dd19a59 to your computer and use it in GitHub Desktop. ... Install using apt-get. sh $ sudo apt-get update $ sudo apt-get install python3 # OR python3.12
🌐
Python.org
discuss.python.org › python help
Install python 3.11.9 on ubuntu - Python Help - Discussions on Python.org
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 ...
Published   April 16, 2024
🌐
Upenn
cets.engineering.upenn.edu › answers › install-python-module.html
How do I install a Python module for use on Linux systems at SEAS?
This article assumes you are logged into a CETS managed Linux machine (Eniac, a lab machine, graduate workstation, etc). Append your .bash_profile so PYTHONPATH includes ~/lib/python2.7/site-packages/ like this: echo export PYTHONPATH="$PYTHONPATH:~/lib/python2.7/site-packages/" >> ~/.bash_profile · Run this command to update the PYTHONPATH for the current session: ... Once you have configured your PYTHONPATH as described above, you can install ...
🌐
Posit
docs.posit.co › resources › install-python-uv.html
Install Python – Posit Docs
If using an alternative source of Python packages, such as Posit Package Manager, configure the package installation client in your Posit product: ... You can configure Python on the system PATH so that users can use pip within a terminal to install packages to their home directory, similar to how R works with install.packages().
🌐
Python
docs.python.org › 3 › installing › index.html
Installing Python modules — Python 3.14.6 documentation
It will often be easier for users to install these packages by other means rather than attempting to install them with pip. ... On Linux, macOS, and other POSIX systems, use the versioned Python commands in combination with the -m switch to run the appropriate copy of pip:
🌐
Python.org
discuss.python.org › packaging
Recommended way to install a Python package system-wide on Linux - Packaging - Discussions on Python.org
May 20, 2022 - For decades, the canonical way to install a Python package system wide has been python setup.py install On most Linux systems this would install the package in the site-packages directory below /usr/local.
🌐
Oracle Linux
yum.oracle.com › oracle-linux-python.html
Python for Oracle Linux | Oracle, Software. Hardware. Complete.
Oracle Linux 7.7 and newer include Python 3. To install Python 3 from the Oracle Linux 7 latest repository: $ sudo yum install -y python3
🌐
Opensource.com
opensource.com › article › 20 › 4 › install-python-linux
How to install Python on Linux | Opensource.com
April 13, 2020 - Once the Python tarball has been extracted, navigate to the configure script and execute it in your Linux terminal with: ... The configuration may take some time. Wait until it is successfully finishes before proceeding. If you already have a version of Python installed on your system and you want to install the new version alongside it, use this command: