Last active
April 5, 2021 08:16
-
-
Save HYChou0515/0db32f293fc90ab30216f2ef173041c1 to your computer and use it in GitHub Desktop.
Install python from source (debian)
This file contains 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
# Reference: https://linuxize.com/post/how-to-install-python-3-9-on-debian-10/ | |
PYVER=3.9.1 | |
# Install the dependencies necessary to build Python: | |
sudo apt update | |
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev liblzma-dev | |
wget https://www.python.org/ftp/python/${PYVER}/Python-{PYVER}.tgz | |
tar -xf Python-${PYVER}.tgz | |
cd Python-${PYVER} | |
./configure --enable-optimizations | |
make -j $(nproc) | |
sudo make altinstall |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment