Devnet
Python
Python3.8 Ubuntu 23.10

To set up Python 3.8 on Ubuntu version 23.10, follow these steps in your terminal:

  1. First, update your package list and install necessary build dependencies:
sudo apt-get update
sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
                        libreadline-dev libsqlite3-dev wget curl llvm \
                        libncurses5-dev libncursesw5-dev xz-utils tk-dev \
                        libffi-dev liblzma-dev python3-openssl git
  1. Next, download and extract the Python 3.8 source code:
mkdir ~/python38
cd ~/python38
wget https://www.python.org/ftp/python/3.8.16/Python-3.8.16.tgz
tar -xf Python-3.8.16.tgz
cd Python-3.8.16
  1. Configure the build:
./configure --enable-optimizations
  1. Compile the source code:
make -j$(nproc)
  1. Install Python:
sudo make install
  1. Verify the installation:
python3.8 --version

To create a virtual environment using Python 3.8, specify the Python version:

python3.8 -m venv <your_virtual_env_name>

Replace <your_virtual_env_name> with the name you want to give to your virtual environment.

credit: stack exchange (opens in a new tab)