Request Quote

Find us on SAP Ariba

Please Leave a Review

AliTech Solutions

Blog

How-to-Install-Python-3.10-on-Ubuntu-20.04-LTS-Ubuntu-18.04

How to Install Python 3.12 on Ubuntu 22.04 LTS, Ubuntu 20.04 LTS & Ubuntu 18.04

How to Install Python 3.12 on Ubuntu 22.04 LTS, Ubuntu 20.04 LTS & Ubuntu 18.04

Python is a programming language that lets you work more quickly and integrate your systems more effectively.

You can learn to use Python and see almost immediate gains in productivity and lower maintenance costs. [1]

How to Install Python 3.12 from source:

Dependencies:

Make sure your system is updated:

sudo apt update && sudo apt upgrade

Install required dependencies:

sudo apt install wget build-essential libreadline-gplv2-dev libncursesw5-dev 
     libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev

Download the archive from Python’s official site:

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

Extract the archive:

tar xzf Python-3.12.2.tgz

Move to extracted directory:

cd Python-3.12.2 

Compile on your system

./configure --enable-optimizations 

Finally install on your system, make sure you are using altinstall command since this might replace your current Python version if you don’t use this command:

make altinstall

If that is successfully installed you can check the Python version:

python3.12 -V

or 

python3.12 --version

 

 

How to Install Python 3.12 from Repository:

Make sure your system is updated:

sudo apt update && sudo apt upgrade -y

Dependencies:

Install required dependencies:

sudo apt install software-properties-common -y

Add repository:

sudo add-apt-repository ppa:deadsnakes/ppa

CAUSION:

This is a third party repository make sure its authenticated before using.

Reporting Issues ================

Issues can be reported in the master issue tracker at: https://github.com/deadsnakes/issues/issues

Finally install Python 3.12:

sudo apt install python3.12

 

[1] https://www.python.org/

[2] https://alitech.io [3] https://www.hostingbyalitech.com

Leave a Comment

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

Recent Posts

Introducing Meta Llama 3

Meta Llama 3: Introducing The Revolutionary AI Model Redefining the Future of Technology

Meta Llama 3: Introducing The Revolutionary AI Model Redefining the Future of Technology In today’s rapidly evolvi
Read More
Meta AI

Meta AI: Your New Smart Assistant

Meta AI: Revolutionizing Digital Assistance Meta AI, spearheaded by Meta founder and CEO Mark Zuckerberg, has entered th
Read More