Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

โ€œInvest in yourself โ€” your confidence is always worth it.โ€

Explore Cosmetic Hospitals

Start your journey today โ€” compare options in one place.

Python Tutorials: Installing Python 3 on Linux, Centos, Ubuntu & Windows

Python 3 Installation in Ubuntu


$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo apt-get update
$ sudo apt-get install python3.8
$ python3 --version

Or

$ sudo apt-get install python3.6
$ python3 --versionCode language: JavaScript (javascript)

Default Versions of Python in CentOS


Depending on when youโ€™re reading this or what version youโ€™re using, the version that you have installed by default or the version thatโ€™s available in the CentOS repo might be different.

For CentOS 7:

  • Python 2.7.5 is installed by default. That version has reached its EOL years ago, so you should upgrade ASAP.
  • Python 3.6.8 is the latest version available in the CentOS 7 repos. 3.6 reached its EOL in Dec 2021, so you should upgrade ASAP.

For CentOS 8:

  • Python isnโ€™t installed by default.
  • Python 3.9.6 is the latest version available in the CentOS 8 repos. The EOL of Python 3.9.6 is Oct 2026, so you can use that version. To install it, just runย yum install python39ย and thatโ€™s it. If you want to install Python 3.10 or 3.11, follow the tutorial below.

Python 3 Installation in Centos


$ sudo yum install yum-utils
$ sudo yum-builddep python3
$ python3 --version

Installing Python 3.6 on CentOS 7

sudo yum -y install wget make gcc openssl-devel bzip2-devel
cd /tmp/
wget https://www.python.org/ftp/python/3.6.12/Python-3.6.12.tgz
tar xzf Python-3.6.12.tgz
cd Python-3.6.12
./configure --enable-optimizations
sudo make altinstall
sudo ln -sfn /usr/local/bin/python3.6 /usr/bin/python3
sudo ln -sfn /usr/local/bin/python3.6 /usr/bin/python
sudo ln -sfn /usr/local/bin/pip3.6 /usr/bin/pip3
python3.6 -V
pip3.6 -V
$ sudo ln -fs /usr/local/bin/python3.6 /usr/bin/python
$ sudo ln -fs /usr/local/bin/python3.6 /usr/bin/python3Code language: JavaScript (javascript)

Installing Python 3.7 on CentOS 7

sudo yum -y install wget make gcc openssl-devel bzip2-devel
cd /tmp/
wget https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tgz
tar xzf Python-3.7.9.tgz
cd Python-3.7.9
./configure --enable-optimizations
sudo make altinstall
sudo ln -sfn /usr/local/bin/python3.7 /usr/bin/python3.7
sudo ln -sfn /usr/local/bin/pip3.7 /usr/bin/pip3.7
python3.7 -V
pip3.7 -V
$ sudo ln -fs /usr/local/bin/python3.7 /usr/bin/python
$ sudo ln -fs /usr/local/bin/python3.7 /usr/bin/python3Code language: JavaScript (javascript)

Installing Python 3.8 on CentOS 7

sudo yum -y install wget make gcc openssl-devel bzip2-devel
cd /tmp/
wget https://www.python.org/ftp/python/3.8.7/Python-3.8.7.tgz
tar xzf Python-3.8.7.tgz
cd Python-3.8.7
./configure --enable-optimizations
sudo make altinstall
sudo ln -sfn /usr/local/bin/python3.8 /usr/bin/python3.8
sudo ln -sfn /usr/local/bin/pip3.8 /usr/bin/pip3.8
python3.8 -V
pip3.8 -V
$ sudo ln -fs /usr/local/bin/python3.8 /usr/bin/python
$ sudo ln -fs /usr/local/bin/python3.8 /usr/bin/python3Code language: JavaScript (javascript)

Installing Python 3.8 on CentOS 7

sudo yum -y install wget make gcc openssl-devel bzip2-devel
cd /tmp/
wget https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz
tar xzf Python-3.9.1.tgz
cd Python-3.9.1
./configure --enable-optimizations
sudo make altinstall
sudo ln -sfn /usr/local/bin/python3.9 /usr/bin/python3.9
sudo ln -sfn /usr/local/bin/pip3.9 /usr/bin/pip3.9
python3.9 -V
pip3.9 -V
$ sudo ln -fs /usr/local/bin/python3.9 /usr/bin/python
$ sudo ln -fs /usr/local/bin/python3.9 /usr/bin/python3Code language: JavaScript (javascript)

How to Install Python 3.10 on CentOS

yum update
yum install openssl-devel bzip2-devel libffi-devel
yum groupinstall “Development Tools”
wget https://www.python.org/ftp/python/3.10.2/Python-3.10.2.tgz
tar -xzf Python-3.10.2.tgz
cd Python-3.10.2
./configure –enable-optimizations
make altinstall
python3.10 -V

$ sudo ln -fs /usr/local/bin/python3.10 /usr/bin/python
$ sudo ln -fs /usr/local/bin/python3.10 /usr/bin/python3

How to Install Python 3.10 on CentOS

yum update
yum install openssl-devel bzip2-devel libffi-devel
yum groupinstall “Development Tools”
wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0a4.tgz
tar -xzf Python-3.11.0a4.tgz
cd Python-3.11.0a4
./configure –enable-optimizations
make altinstall
python3.11 -V

$ sudo ln -fs /usr/local/bin/python3.11 /usr/bin/python
$ sudo ln -fs /usr/local/bin/python3.11 /usr/bin/python3

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Top 10 AI SEO Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI SEO tools have become indispensable for digital marketers, businesses, and content creators aiming to dominate search engine rankings. These tools leverage artificial intelligence…

Read More

Top 10 Product Lifecycle Management (PLM) Tools in 2026: Features, Pros, Cons & Comparison

Introduction Product Lifecycle Management (PLM) is a strategic approach to managing a productโ€™s journey from conception through design, manufacturing, and end-of-life. In 2026, PLM software has evolved…

Read More

Top 10 Patch Management Tools in 2026: Features, Pros, Cons & Comparison

Introduction: The Importance of Patch Management in 2026 In 2026, as cyber threats evolve and technology becomes more complex, patch management tools are critical for maintaining cybersecurity…

Read More

Top 10 Headless CMS Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, Headless Content Management Systems (CMS) have become the go-to solution for businesses seeking flexibility, scalability, and a modern approach to content management. Unlike traditional…

Read More

Top 10 AI Lead Scoring Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI lead scoring tools have become indispensable for B2B and B2C businesses aiming to optimize their sales pipelines. These tools leverage artificial intelligence to…

Read More

Top 10 AI Portfolio Optimization Tools in 2026: Features, Pros, Cons & Comparison

Introduction Investment management has always been about making smart choices at the right time. Traditionally, this required endless hours of research, manual calculations, and intuition. But in…

Read More
Subscribe
Notify of
guest
2 Comments
Newest
Oldest Most Voted
Snehith J Shiju
Snehith J Shiju
2 years ago

There is an error in your page
In (How to Install Python 3.10 on CentOS) change it to 3.11You have displayed it twice

Alex
Alex
3 years ago

Doesn’t work on CentOS 7.

2
0
Would love your thoughts, please comment.x
()
x