Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
my Python 3.8.1 build script on CentOS 7
# original source/tip:
wget -P /tmp/
tar xzfv /tmp/Python-3.8.1.tgz -C /tmp
cd /tmp/Python-3.8.1
sudo ./configure --enable-shared --enable-optimizations \
--prefix=/opt/python381 \
LDFLAGS="-Wl,-rpath=/opt/python381/lib -Wl,-Bsymbolic-functions -Wl,-z,relro" \
--with-computed-gotos --with-system-ffi --with-fpectl \
--with-system-libmpdec --with-lto
sudo make -j `nproc`
sudo make altinstall
sudo rm /tmp/Python-3.8.1.tgz
# this section I did manually because I want to see if build works
sudo ln -s /opt/python381/bin/python3.8 /opt/python381/bin/python3
sudo ln -s /opt/python381/bin/python3.8 /opt/python381/bin/python
sudo ln -s /opt/python381/bin/python3.8 /usr/bin/python381
sudo ln -s /opt/python381/bin/pip3.8 /opt/python381/bin/pip3
sudo ln -s /opt/python381/bin/pip3.8 /opt/python381/bin/pip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment