🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-install-python-on-linux
How to Install Python on Linux - GeeksforGeeks
July 12, 2025 - Pacman is the default package manager for Arch Linux, offering a rolling release model, Latest software versions, Simple and fast package management, and Minimal overhead. Synchronizes package repositories and updates your system. ... Installs the latest available Python version. ... Adds pip for Python library management. ... Removes conflicting packages safely. ... YUM offers Enterprise-grade stability, Long-term support, Extensive documentation, Commercial support options.
🌐
DevOpsSchool.com
devopsschool.com › home › python tutorials: installing python 3 on linux, centos, ubuntu & windows
Python Tutorials: Installing Python 3 on Linux, Centos, Ubuntu & Windows - DevOpsSchool.com
August 7, 2023 - If you want to install Python 3.10 or 3.11, follow the tutorial below. $ sudo yum install yum-utils $ sudo yum-builddep python3 $ python3 --version
Discussions

Installing Python 3 on RHEL - Stack Overflow
I see all the answers as either asking to compile python3 from code or installing the binary RPM package. Here is another answer to enable EPEL (Extra Packages for Enterprise Linux) and then install python using yum. More on stackoverflow.com
🌐 stackoverflow.com
Yum but written with Python 3?
Yum is kinda deprecated, dnf is the replacement for yum on RPM-based distros. So you're unlikely to ever see a PY3-compat yum project. DNF has been the replacement for yum for a couple of years now, more of it is written in c++ for complex things like dependency resolution (uses libsolv). On Redhat/Centos 8 you can install python3-dnf to get a Python interface to the packaging system. More on reddit.com
🌐 r/Python
2
1
May 16, 2020
Messed up my Python installation, now Yum won't work, how to reinstall yum and it's dependencies

These should more or less be all the dependencies you need for yum to work:

cpio-0:2.11-27.el7.x86_64
yum-metadata-parser-0:1.1.4-10.el7.x86_64
diffutils-0:3.3-5.el7.x86_64
diffutils-0:3.3-5.el7.i686
python-0:2.7.5-88.el7.x86_64
python-iniparse-0:0.4-9.el7.noarch
pygpgme-0:0.3-9.el7.x86_64
rpm-python-0:4.11.3-43.el7.x86_64
pyliblzma-0:0.5.3-11.el7.x86_64
rpm-0:4.11.3-43.el7.x86_64
pyxattr-0:0.5.1-5.el7.x86_64
python-urlgrabber-0:3.10-10.el7.noarch
yum-plugin-fastestmirror-0:1.1.31-54.el7_8.noarch

I am on 7.8.2003, but it should still use the same repository as you. You can find the packages here, under os and updates http://mirror.centos.org/centos/7/

As an example for the python package:

rpm --reinstall -v http://mirror.centos.org/centos/7/os/x86_64/Packages/python-2.7.5-88.el7.x86_64.rpm

I don't know what all you will need to get things working again, but this should help you get started

More on reddit.com
🌐 r/CentOS
17
6
August 5, 2020
Trying to install python3.9 on CentOS 7
Just curious, why are you sticking with CentOS 7 instead of upgrading to CentOS Stream 9, Rocky Linux 9, RedHat EL 9 or Alma 9? More on reddit.com
🌐 r/CentOS
7
10
October 19, 2022
🌐
Readthedocs
fire-insights.readthedocs.io › en › latest › installation › python-install-linux.html
Python Installation on Linux - Redhat/CentOS — Sparkflows 0.0.1 documentation
yum install python-wheel · export PYSPARK_PYTHON=/usr/bin/python3 · export PYSPARK_DRIVER_PYTHON=/usr/bin/python3 · Ubuntu : https://docs.python-guide.org/starting/install3/linux/
🌐
GitHub
gist.github.com › MichaelCurrin › 57d70f6aaba1b2b9f8a834ca5dd19a59
Install Python on Linux distros · GitHub
Using pyenv might make this easier though · From the Fedora Project article, which also covers using multiple Python versions and virtual environments. ... From Real Python. $ sudo yum install yum-utils $ sudo yum install https://centos7.i...
🌐
Serverspace
serverspace.io › support › help › install-python-centos
How to Install or Upgrade Python on CentOS 7/8 Stream: Build the Latest Python from Source
April 9, 2025 - In order to perform a Python version upgrade, a few new packages must be supplied in addition. Send commands to the terminal: yum groupinstall -y "Development Tools" --skip-broken · wget https://public-yum.oracle.com/public-yum-ol6.repo -O /etc/yum.repos.d/public-yum-ol6.repo ... sudo dnf install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel
🌐
Unihost
unihost.com › help › how to install python 3
How to Install Python 3 - Unihost.FAQ
February 23, 2023 - This guide will walk you through how to install the most recent version of Python 3 on CentOS 7 and Ubuntu 18.04 or Ubuntu 20.04. Before you begin, refresh the package listings. This helps ensure that yum is up to date.
🌐
Liquid Web
liquidweb.com › home › how to install python 3 on centos 7
Install Python 3 on CentOS 7: Easy Steps for Linux Users | Liquid Web
April 7, 2025 - In order to install Python 3 from source, we are going to need to ensure that some prerequisite packages are installed on our system. [root@centos7 ~]# yum install gcc openssl-devel bzip2-devel libffi-devel -y
🌐
DedicatedCore
dedicatedcore.com › home › how to install latest version of python 3.10 on centos 7
How to Install Latest Version of Python 3.10 on CentOS 7 - DedicatedCore Blog
May 29, 2025 - Before continuing with the installation on your CentOS system. You can move on to the following step if your CentOS installation is 7.7 or newer. You must add IUS, a yum repository that offers more recent software versions and contains Python 3 if you are using a CentOS version older than 7.7.
Find elsewhere
🌐
In Easy Steps
ineasysteps.com › home › how do i install python on linux?
How do I install Python on Linux? - In Easy Steps
February 9, 2023 - In most cases, this involves running ... APT like this: sudo apt updatesudo apt install python3 · On CentOS/Red Hat, you need to use yum: sudo yum update sudo yum install python3 ·...
🌐
Linux Stans
linuxstans.com › how-to-install-python-centos
How to Install Python 3.10 (or 3.11) on CentOS - Linux Stans
January 24, 2022 - Python 3.9.6 is the latest version available in the CentOS 8 repos. The EOL of Python 3.9.6 is Oct 2025, so you can use that version. To install it, just run yum install python39 and that’s it.
Top answer
1 of 16
257

Installing from RPM is generally better, because:

  • you can install and uninstall (properly) python3.
  • the installation time is way faster. If you work in a cloud environment with multiple VMs, compiling python3 on each VMs is not acceptable.

Solution 1: Red Hat & EPEL repositories

Red Hat has added through the EPEL repository:

  • Python 3.4 for CentOS 6
  • Python 3.6 for CentOS 7

[EPEL] How to install Python 3.4 on CentOS 6

sudo yum install -y epel-release
sudo yum install -y python34

# Install pip3
sudo yum install -y python34-setuptools  # install easy_install-3.4
sudo easy_install-3.4 pip

You can create your virtualenv using pyvenv:

pyvenv /tmp/foo

[EPEL] How to install Python 3.6 on CentOS 7

With CentOS7, pip3.6 is provided as a package :)

sudo yum install -y epel-release
sudo yum install -y python36 python36-pip

You can create your virtualenv using pyvenv:

python3.6 -m venv /tmp/foo

If you use the pyvenv script, you'll get a WARNING:

$ pyvenv-3.6 /tmp/foo
WARNING: the pyenv script is deprecated in favour of `python3.6 -m venv`

Solution 2: IUS Community repositories

The IUS Community provides some up-to-date packages for RHEL & CentOS. The guys behind are from Rackspace, so I think that they are quite trustworthy...

https://ius.io/

Check the right repo for you here:

https://ius.io/setup

[IUS] How to install Python 3.6 on CentOS 6

sudo yum install -y https://repo.ius.io/ius-release-el6.rpm
sudo yum install -y python36u python36u-pip

You can create your virtualenv using pyvenv:

python3.6 -m venv /tmp/foo

[IUS] How to install Python 3.6 on CentOS 7

sudo yum install -y https://repo.ius.io/ius-release-el7.rpm
sudo yum install -y python36u python36u-pip

You can create your virtualenv using pyvenv:

python3.6 -m venv /tmp/foo
2 of 16
207

It is easy to install python manually (i.e. build from source):

  1. Download (there may be newer releases on Python.org):

     $ wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz
    
  2. Unzip

     $ tar xf Python-3.* 
     $ cd Python-3.*
    
  3. Prepare compilation

     $ ./configure
    
  4. Build

     $ make
    
  5. Install

     $ make install
    

    OR if you don't want to overwrite the python executable (safer, at least on some distros yum needs python to be 2.x, such as for RHEL6) - you can install python3.* as a concurrent instance to the system default with an altinstall:

     $ make altinstall
    

Now if you want an alternative installation directory, you can pass --prefix to the configurecommand.

Example: for 'installing' Python in /opt/local, just add --prefix=/opt/local.

After the make install step: In order to use your new Python installation, it could be, that you still have to add the [prefix]/bin to the $PATH and [prefix]/lib to the $LD_LIBRARY_PATH (depending of the --prefix you passed)

🌐
Zomro
zomro.com › blog › articles › 507-installing-python-on-linux-several-ways
Installing Python on Linux. Several ways | Zomro
September 16, 2024 - sudo apt-get install -y make curl build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl ... sudo yum -y install curl gcc make zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel libffi-devel tk-devel
🌐
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 ...
🌐
Linux TLDR
linuxtldr.com › home › python 3.13 installation on linux with hands-on examples
Python 3.13 Installation on Linux with Hands-on Examples
October 10, 2024 - $ sudo apt install python3-pip -y #Debian, Ubuntu, or Pop!_OS $ sudo dnf install python3-pip -y #Fedora $ sudo yum install python3-pip -y #Red Hat, CentOS $ sudo pacman -Sy python-pip #Arch, Manjaro, or EndeavourOS
🌐
nixCraft
cyberciti.biz › nixcraft › howto › package management › rhel 8 install python 3 or python 2 using yum
RHEL 8 install Python 3 or Python 2 using yum - nixCraft
May 23, 2024 - Type the following yum command to install Python 3 on Red Hat Enterprise Linux version 8: sudo yum install python3 OR sudo yum module install python36 Verify installation by typing the type command/command command: $ type -a python3 python3 ...
🌐
Python Packaging
packaging.python.org › guides › installing-using-linux-tools
Installing pip/setuptools/wheel with Linux Package Managers — Python Packaging User Guide
Enable the IUS repository and install one of the parallel-installable Pythons, along with pip, setuptools, and wheel, which are kept fairly up to date. ... Recent Debian/Ubuntu versions have modified pip to use the “User Scheme” by default, which is a significant behavior change that can be surprising to some users. ... Currently, there is no “copr” yum ...
🌐
Zomro
zomro.com › blog › faq › 294-kak-ustanovit-python-310-na-centos-7
How to install Python 3.10 on CentOS 7 | Zomro
August 31, 2023 - CentOS, a popular Linux server distribution, is often used in corporate environments. This article will show you how to install Python 3.10 on CentOS 7. Before installing new software, it is recommended to update system packages to the latest versions. ... sudo yum groupinstall "Development Tools" -y sudo yum install openssl-devel libffi-devel bzip2-devel -y
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › how to install python 3 on ubuntu
How to Install Python 3 on Ubuntu | phoenixNAP KB
June 12, 2025 - Via APT. Install the latest version available in the default Ubuntu repository. From source code. Install the latest version from the official Python website.
🌐
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 - Type the following yum command or dnf command: $ sudo yum install python OR # dnf install python See “RHEL 8 install Python 3 or Python 2 using yum” for more info. Use the zypper command to search Python: $ sudo zypper ref $ sudo zypper ...