Question

Python3 in centos 9

I am trying to create an integrated environment in centos 9 that should include python3 . is it possible to use the python3 installation for centos 8 as centos 9 is not an option. If not , is centos 8 still available as a droplet ? I was only able to install centos 9


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
August 11, 2022

Hi @gittyhubhubhub

You can still create CentOS 8 and 7 Droplets from your Control Panel. In the menu creating a Droplet with your desired distribution, on the CentOS selection is a dropdown that let you choose between the 3 - 7, 8 and 9.

As for installing Python3 on CentOS 9, I’m not sure there is an official way to do this. You’ll need to configure it from source. I’ll provide you with the steps here however if you are having difficulties with the new CentOS version, I’ll recommend using 8 or 7 instead.

Anyway, SSH to your Droplet

  1. wget https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz
  2. tar zxvf Python-3.9.7.tgz
  3. cd Python-3.9.7/

Once inside, you’ll need to configure Python:

  1. ./configure
  2. make
  3. make altinstall

After some time when the process finishes you should have Python3.9 available on your Droplet. Having said that, as it’s a manual configuration you might experience some missing modules later on. As such, if you are still a novice, I’ll recommend against using such a new version that still is missing ways to install key services like Python.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up