By using this site, you agree to the Privacy Policy.
Accept
EnterinITEnterinITEnterinIT
  • HOME
  • IT PRO
  • TECH
  • MICROSOFT
    • Azure
    • ConfigMgr/SCCM
    • DPM
    • Orchestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Office 365
    • Office Insider
    • Power BI
    • Skype
    • SQL Server
    • Teams
  • WINDOWS
    • Windows Admin Center
    • Windows Client
    • Windows Server
  • SCCM Query Collection List
Reading: Install Python 3.8 on CentOS 7 CentOS 8
Font ResizerAa
EnterinITEnterinIT
Font ResizerAa
  • HOME
  • IT PRO
  • TECH
  • MICROSOFT
  • WINDOWS
  • SCCM Query Collection List
Search
  • HOME
  • IT PRO
  • TECH
  • MICROSOFT
    • Azure
    • ConfigMgr/SCCM
    • DPM
    • Orchestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Office 365
    • Office Insider
    • Power BI
    • Skype
    • SQL Server
    • Teams
  • WINDOWS
    • Windows Admin Center
    • Windows Client
    • Windows Server
  • SCCM Query Collection List
Python

Install Python 3.8 on CentOS 7 CentOS 8

Published: February 18, 2024
2 Min Read
SHARE

Install Python 3.8 on CentOS 7 CentOS 8

Contents
Step 1: Install Python DependenciesStep 2: Download the latest Python 3.8 ArchiveStep 3: Install Python 3.8 on CentOS 7 / CentOS 8Step 4: Check Python 3.8 on CentOS 8 / CentOS 7.

Python works on Windows, Mac, Linux, Raspberry Pi, BS, and many other systems. As of this article update, the latest release of Python is version Python 3.8.12. This is the version of Python that we’ll install in this guide.

Step 1: Install Python Dependencies

As we’ll install Python from the source, let’s install the packages required for Python installation.

sudo yum -y install epel-release
sudo yum -y update

Install build dependencies:

sudo yum -y groupinstall "Development Tools"
sudo yum -y install openssl-devel bzip2-devel libffi-devel xz-devel

Confirm gcc is available:

$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Step 2: Download the latest Python 3.8 Archive

Now download the latest archive of the Python 3.8 release.

sudo yum -y install wget
wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz

Extract the package.

tar xvf Python-3.8.12.tgz

Change the created directory:

cd Python-3.8*/

Step 3: Install Python 3.8 on CentOS 7 / CentOS 8

Setup installation by running the configure script.

./configure --enable-optimizations

Initiate compilation of Python 3.8.

sudo make altinstall

If this was successful, you should get a message like below:

.....
Looking in links: /tmp/tmpy9yqf1bp
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-19.2.3 setuptools-41.2.0

Step 4: Check Python 3.8 on CentOS 8 / CentOS 7.

Confirm that the installation of Python 3.8 on CentOS 8 / CentOS 7 was successful.

$ python3.8 --version
Python 3.8.12

Pip is also installed.

$ pip3.8 --version
pip 19.2.3 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
TAGGED:CentOSPythonYUM
Previous Article Disable weak SSH encryption algorithms
Next Article AssertionError: database connection isn’t set to UTC
Leave a Comment Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Translation

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
by Transposh - translation plugin for wordpress

Popular Posts

System Requirements for Windows Server 2016
Windows Server
Configuration Manager Query Collection List
Configuration Manager Query Collection List
ConfigMgr
Structured/Managed Navigation enabled on Modern Pages in Classic Team Sites
Tech
SCCM Failed to get DP locations as the expected version from MP
ConfigMgr

Recent Posts

Installing and Configuring Fail2ban for SSH Protection on Ubuntu 24.04
Linux
Enabling and Configuring FirewallD on AlmaLinux
Linux
User Creation and SSH Key Setup in AlmaLinux
Linux
How to reset password on AlmaLinux
Linux

© 2023 EnterinIT

Go to mobile version
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?