Skip to content

Instantly share code, notes, and snippets.

@ohidurbappy
Last active October 26, 2022 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohidurbappy/9294fd28b702aec92b31a9c2fd2f6032 to your computer and use it in GitHub Desktop.
Save ohidurbappy/9294fd28b702aec92b31a9c2fd2f6032 to your computer and use it in GitHub Desktop.
  1. For compiling the source code install essential packages. (If you haven't done this before)
sudo apt install wget build-essential checkinstall
sudo apt install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev 
sudo apt install zlib1g-dev
sudo apt install zlib1g zlib1g-dev libssl-dev libbz2-dev libsqlite3-dev
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
sudo apt install libedit-dev libnss3-dev 
  1. Download Python 3.11 source code from the official download site in the Desktop.
sudo wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tgz
  1. Extract the downloaded archive file and prepare the source for the installation.
tar xzf Python-3.11.0.tgz
cd Python-3.11.0
sudo ./configure --enable-optimizations
  1. Now, install Python 3.11 on your system.
make -j 8
sudo make altinstall 
  1. Verify the installed version:
python3.11 --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment