🌐
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 - Now, this module stream is enabled automatically, and you can verify this using: python3 --version. Let's go ahead and install Python 3.9 on RHEL 8: ... Verify this specific installation using: python3.11 --version.
🌐
Medium
medium.com › @sahildrive007 › installing-python-3-11-on-rhel-8-server-9fea12c2f6ee
Installing Python 3.11 on RHEL 8 server - sahil suri - Medium
July 4, 2024 - Installing Python 3.11 on RHEL 8 server Here are the steps to install Python 3.11.3 on a RHEL 8 system: 1. Update the System Packages: sudo dnf update 2. Install Development Tools: sudo dnf …
Discussions

Installing Python 3 on RHEL - Stack Overflow
I'm trying to install python3 on RHEL using the following steps: yum search python3 Which returned No matches found for: python3 Followed by: yum search python None of the search results contai... More on stackoverflow.com
🌐 stackoverflow.com
RHEL8 Python Version Management
Red Hat backports security fixes, so auditing software that naively only looks at package version numbers will often turn up false positives. More on reddit.com
🌐 r/linuxadmin
10
6
January 21, 2025
How to install Python 3.8.1 on RHEL 8? - Stack Overflow
This is really frustrating. I want to install the latest version of Python (at the time of this issue: Python 3.8.1) on RHEL 8, (RHEL being one of the most widely used distributions of Linux). I ... More on stackoverflow.com
🌐 stackoverflow.com
How to upgrade Python 3 on Linux RHEL? - Stack Overflow
I have a Rhel version of a Linux and would like to upgrade from Python 3.6 to 3.7.2 What is the best and proven way to do it? Tried with yum but seems that does not have latest versions of python.. More on stackoverflow.com
🌐 stackoverflow.com
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_enterprise_linux › 8 › html › configuring_basic_system_settings › installing-and-using-dynamic-programming-languages_configuring-basic-system-settings
Chapter 16. Installing and using dynamic programming languages | Configuring basic system settings | Red Hat Enterprise Linux | 8 | Red Hat Documentation
To create Python 3.11 or Python 3.12 virtual environments, use the python3.11 -m venv or python3.12 -m venv commands instead, which use the venv module from the standard library. In Red Hat Enterprise Linux 8, Python 3 is distributed in python3.11 and python3.12 package suites in the AppStream ...
🌐
Red Hat
access.redhat.com › solutions › 7016683
Unable to install Python 3.11 in RHEL 8 and RHEL 9 - Red Hat Customer Portal
According to Python support for Red Hat Enterprise Linux (RHEL), Python 3.11 is supported for RHEL 8 and RHEL 9 Howerver yum is not able to find Python 3.11 $ yum list python3.11 Error: No matching
🌐
TecAdmin
tecadmin.net › install-python-3-11-on-centos-fedora
How To Install Python 3.11 on CentOS/RHEL 9/8 & Fedora – TecAdmin
April 26, 2025 - Mostly the latest operating systems come with the latest Python versions. But the OS versions released before the release of Python 3.11 may not have the latest version. This tutorial will help you to install Python 3.11 on your CentOS, Red Hat & Fedora operating systems by compiling it from source code.
🌐
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
If you want to download and install third-party applications for Python 3.11 or Python 3.12, install the python3.11-pip or python3.12-pip package. ... Installing Python packages with pip as the root user places files in system locations. This can override RHEL libraries and might cause system ...
🌐
TecMint
tecmint.com › home › python › how to install latest python from source in linux
How to Install Latest Python from Source in Linux
August 10, 2023 - Once needed core packages are installed, you can head over to the official Python download page to download the Python 3.11 source release or use the following wget command to download it directly and install it.
🌐
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 ...
🌐
Red Hat
catalog.redhat.com › en › software › containers › rhel8 › python-311 › 6278e0f006a32ea64d5d6c2c
Python 3.11 - Red Hat Ecosystem Catalog
May 13, 2026 - Here are a few things you should know about Red Hat source containers. Although they are packaged as containers, source containers cannot be run. So instead of using podman pull to get them to your system, use the skopeo command. Source containers are named based on the binary containers they represent. So, for example, to get the source container for a particular standard RHEL UBI 8 container (registry.access.redhat.com/ubi8/ubi8.1-397) you simply append -source to get the source code container for that image (registry.access.redhat.com/ubi8/ubi8.1-397-source).
Find elsewhere
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)

🌐
Red Hat
access.redhat.com › solutions › 4763521
How to install newer versions of python on RHEL 8 - Red Hat Customer Portal
June 14, 2024 - How to install newer versions of python on RHEL 8 · Red Hat Enterprise Linux 8
🌐
thelinuxvault
thelinuxvault.net › blog › install-python-3-on-redhat-8
Install Python 3 on Red Hat Enterprise Linux (RHEL) 8: A Comprehensive Guide
The easiest way to install Python 3 on RHEL 8 is using the dnf package manager, which pulls packages from Red Hat’s official repositories.
🌐
Red Hat
access.redhat.com › solutions › 6879401
Python support for Red Hat Enterprise Linux (RHEL) - Red Hat Customer Portal
May 19, 2026 - What is the official Red Hat standpoint on Python 3.x support? What is the lifecycle statement of python36 for RHEL 8? How to install Python 3.X on Red Hat Enterprise Linux 7?
🌐
Reddit
reddit.com › r/linuxadmin › rhel8 python version management
r/linuxadmin on Reddit: RHEL8 Python Version Management
January 21, 2025 -

I have a question about yum/dnf dependencies. Our security team’s software (Rapid 7) is flagging a lot of instances as having vulnerable Python versions installed. This is because RHEL8 uses Python 3.6 by default. I know we can install newer versions of Python, like 3.11, but is there a way to set that version as the default for any python3 dependency? Example: If I run yum install Ansible on a RHEL8 host yum will list python3.6 as a dependency and install it even if Python 3.11 is already installed. Messing around with Alternatives doesn’t seem to do anything for yum dependencies.

Edit: thanks all. Going to work with our Security team to have Rapid 7 ignore this.

🌐
Red Hat
developers.redhat.com › blog › 2018 › 11 › 14 › python-in-rhel-8-3
Python in RHEL 8 | Red Hat Developer
February 22, 2024 - To install Python, type `yum install python3`. To run Python, type `python3`. What you need to know for using Python in RHEL 8
🌐
TecMint
tecmint.com › home › redhat › how to install python 3 or python 2 in rhel 8
How to Install Python 3 or Python 2 in RHEL 8
July 5, 2019 - In this short article, we will show how to install Python 3 and Python 2, and run them in parallel in RHEL 8 Linux distribution.
🌐
ComputingForGeeks
computingforgeeks.com › home › centos › how to install python 3.11 on centos 7 / rhel 7
How To Install Python 3.11 on CentOS 7 / RHEL 7 | ComputingForGeeks
July 1, 2024 - We shall install it from the source code but there are dependency packages to be installed before a build process. sudo yum -y install epel-release sudo yum install wget make cmake gcc bzip2-devel libffi-devel zlib-devel · All Development Tools ...
🌐
LinuxConfig
linuxconfig.org › home › install python 3 on redhat 8
Install Python 3 on RHEL 8 Easily
January 7, 2020 - To install Python 3 on Red Hat Enterprise Linux 8 execute the following dnf command: