Install latest version of Python ( Python 3.12 ) on Ubuntu 22.04

Опубликовано: 10 Октябрь 2024
на канале: james kiarie
9,975
201

This video illustrates how to install the latest version of Python on Ubuntu 22.04.
#python3 #ubuntu22 #python3.12

Timestamps:

0:00 Install Python from Deadsnakes PPA

8:57 Install Python from source

Method 1: Install Python 3.12 from Deadsnakes PPA

Step 1: sudo apt update

Step 2: sudo add-apt-repository ppa:deadsnakes/ppa

Press ENTER when prompted to continue.

Step 3: sudo apt update

Step 4: sudo apt install python3.12


Method 2: Install Python 3.12 from Source

Step 1: sudo apt update

Step 2: sudo apt -y install gdb lcov libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev libncurses5-dev libreadline6-dev libssl-dev lzma lzma-dev tk-dev uuid-dev zlib1g-dev gcc make pkg-config

Step 3: wget https://www.python.org/ftp/python/3.1...

Step 4: cd Python-3.12.0

Step 5: sudo ./configure --enable-optimizations

Step 6: sudo make -j 2

Step 7: sudo make install