Skip to content

Instantly share code, notes, and snippets.

@gavxin
Created December 13, 2024 08:33
Show Gist options
  • Save gavxin/a21128ba0fba006db285c962da941898 to your computer and use it in GitHub Desktop.
Save gavxin/a21128ba0fba006db285c962da941898 to your computer and use it in GitHub Desktop.
install python3.13 on CentOS7
sudo yum install devtoolset-11-gcc\*
sudo yum install ncurses-devel openssl11 openssl11-devel readline readline-devel lzma-sdk lzma-sdk-devel xz-devel
# download python
wget https://www.python.org/ftp/python/3.13.1/Python-3.13.1.tgz
tar xzvf Python-3.13.1.tgz
cd Python-3.13.1
# configure
# patch openssl
sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure
./configure --prefix=/opt/python-3.13.1
# bypass build error
sed -i 's/-Werror=implicit-function-declaration//g' Makefile
# build
make -j$(nproc)
# install
sudo make altinstall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment