Skip to content

Instantly share code, notes, and snippets.

@basaks
Last active August 11, 2024 04:01
Show Gist options
  • Save basaks/0fad2f9929a4a9e719512c37c766b05f to your computer and use it in GitHub Desktop.
Save basaks/0fad2f9929a4a9e719512c37c766b05f to your computer and use it in GitHub Desktop.
Python3.8 on ubuntu 22.04 Jammy
## Install Python3.8 interpreter on ubuntu 22.04
On a terminal just do the following steps:
Install dependencies:
sudo apt install tar build-essential checkinstall libreadline-dev \
libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev \
libbz2-dev openssl libffi-dev
Download and untar the desired version:
mkdir -p $HOME/opt
cd $HOME/opt
curl -O https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz
tar -xzf Python-3.8.9.tgz
Install python3.8 while keeping python3.10 as the default python3 version on ubuntu 22.04.
cd Python-3.8.9/
./configure --enable-shared --enable-optimizations --prefix=/usr/local LDFLAGS="-Wl,--rpath=/usr/local/lib"
sudo make altinstall
Check it was installed properly:
>> python3.8 -V
Python 3.8.9
Enjoy!
@Landon0615
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment