Created
December 13, 2024 08:33
-
-
Save gavxin/a21128ba0fba006db285c962da941898 to your computer and use it in GitHub Desktop.
install python3.13 on CentOS7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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