• Home
  • Ubuntu 20.04
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 20.04
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31

Written by Rahul, Updated on November 2, 2020

Recently, Python development team released latest stable version of Python 3.9. You can download it from its official pages. New version comes with multiple new features and security updates.

This tutorial will help you to install Python 3.9 on CentOS/RHEL 7 & Fedora systems. We will compile Python from source code.

Prerequisites

This Python installation required the GCC compiler on your system. Login to your server using ssh or shell access. Now, use the following command to install prerequisites for Python before installing it.

sudo yum install gcc openssl-devel bzip2-devel libffi-devel zlib-devel 

Step 1 – Download Python 3.9

Download Python using following command from python official site. You can also download the latest version in place of specified below.

wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz 

Then, extract the archive file on your system:

tar xzf Python-3.9.0.tgz 

This will create a directory named Python-3.9.0 in current directory.

Step 2 – Install Python 3.9 on CentOS

Change directory to Python-3.9.0 and use the following commands to compile python source code on your system using altinstall.

cd Python-3.9.0 
sudo ./configure --enable-optimizations 
sudo make altinstall 
make altinstall is used to prevent replacing the default python binary file /usr/bin/python.

Now remove downloaded source archive file from your system

sudo rm Python-3.9.0.tgz 

Step 3 – Test Python Version

Check the latest version installed of python using below command

python3.9 -V  

Python 3.9.0

Conclusion

In this tutorial, you have learned to install Python 3.9 on CentOS 7 and Fedora systems using source code.

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Leave a Reply Cancel reply

Popular Posts

  • How To Install Python 3.9 on Debian 10
  • Download Ubuntu 20.04 LTS – DVD ISO Images
  • Linux Run Commands As Another User
  • How to Check PHP Version (Apache/Nginx/CLI)
  • How To Install and Configure GitLab on Ubuntu 20.04
  • How to Install PyCharm on Ubuntu 20.04
  • How to Check Ubuntu Version with Command or Script
  • How to Set all directories to 755 And all files to 644
© 2013-2021 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy