Skip to content

Instantly share code, notes, and snippets.

@jftuga
Last active December 23, 2022 10:09
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 jftuga/8db8172a20754645886fdd244226951c to your computer and use it in GitHub Desktop.
Save jftuga/8db8172a20754645886fdd244226951c to your computer and use it in GitHub Desktop.
Compiling Python 3.9 on Debian Buster or Raspberry Pi OS

Tested with Python 3.9.5 on Raspbian GNU/Linux 10 (buster)

https://www.python.org/downloads/source/

apt install -y libbz2-dev libffi-dev libffi-dev libgdbm-compat-dev libgdbm-dev liblzma-dev libncurses-dev \
    libncurses5-dev libnss3-dev libreadline-dev libsqlite3-dev libssl-dev uuid-dev zlib1g-dev
./configure --prefix=/opt
# edit Makefile to remove `-g -Wall`
make -j 4
make install

https://tecadmin.net/how-to-install-python-3-10-on-centos-rhel-8-fedora/

dnf install wget yum-utils make gcc openssl-devel bzip2-devel libffi-devel zlib-devel sqlite-devel
dnf install readline-devel ncurses-devel gdbm-devel nss-devel uuid-devel lzma-sdk-devel
./configure --prefix=/opt --enable-optimizations
# edit Makefile to remove `-g`
make -j 6
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment