Atlantic.Net Blog

How to Install Python 3.10 on Rocky Linux 8

Hitesh Jethva
by Atlantic.Net (429 posts) under Tutorials, VPS Hosting
0 Comments

The free and open-source programming language Python is one of the most popular high-level languages and object-oriented applications. Generally, it is used in automation, scripting, data analysis, machine learning, back-end development, handling big data, and performing complex mathematics. Due to its versatile features, it is a popular choice for both beginners and experienced developers. At the time of writing this article, Python 3.10 is the latest version of Python.

In this post, we will show you how to install Python 3.10 on Rocky Linux 8.

Prerequisites

  • A server running Rocky Linux 8 on the Atlantic.Net Cloud Platform
  • A root password configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Rocky Linux 8 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in to your server, run the following command to update your base system with the latest available packages.

dnf update -y

Step 2 – Install Required Dependencies

First, you will need to install some dependencies required to compile Python 3.10. You can install all of them by running the following command:

dnf install curl gcc openssl-devel bzip2-devel libffi-devel zlib-devel wget make -y

Once all the dependencies are installed, you can proceed to the next step.

Step 3 – Install Python 3.10 on Rocky Linux 8

First, go to the Python official download page and download the latest version of Python using the following command:

wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tar.xz

Once the download is completed, extract the downloaded file using the following command:

tar -xf Python-3.10.0.tar.xz

Next, change the directory to the extracted directory and configure Python using the following command:

cd Python-3.10.0
./configure --enable-optimizations

Next, start the build process using the following command:

make -j 2
nproc

Finally, install Python 3.10 by running the following command:

make altinstall

After the successful installation, verify the Python installation using the following command:

python3.10 --version

You will get the following output:

Python 3.10.0

Step 4 – Create a Virtual Environment in Python

Python provides a venv module that allows you to create a virtual environment and deploy your application in an isolated environment.

To create a virtual environment named app_env, run the following command:

python3.10 -m venv app_env

Next, activate the virtual environment using the following command:

source app_env/bin/activate

You will get the following shell:

(app_env) [[email protected] ~]#

Now, you can use the PIP package manager to install any package and dependencies inside your virtual environment.

For example, run the following command to install apache-airflow:

pip3.10 install apache-airflow

If you want to remove this package, run the command below:

pip3.10 uninstall apache-airflow

To exit from the Python virtual environment, run the following command:

deactivate

Conclusion

In the above guide, we explained how to install Python 3.10 on Rocky Linux 8. You can now start developing your first application using the Python programming language. Try it today on VPS hosting from Atlantic.Net!

Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

How to Install Sails.js Framework with Nginx on Oracle Linux 8
How to Install OTRS on Oracle Linux 8
How to Install and Configure Caddy Web Server with PHP on Oracle Linux 8
How to Install and Use PIP Python Package Manager on Oracle Linux 8
How to Install FTP Server with ProFTPD on Oracle Linux 8

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2008 Lookout Dr,

Dallas, Texas 75044

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources