Last active
December 11, 2019 10:11
-
-
Save cedricbonhomme/35e81e295fd4baed83d6ccb2cb9fde79 to your computer and use it in GitHub Desktop.
How I install Python on a Debian system
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
sudo apt-get install -y build-essential | |
sudo apt-get install -y libssl-dev openssl # for pip | |
sudo apt-get install -y libsqlite3-dev # for sqlite | |
sudo apt-get install -y tk-dev # for tkinter | |
PYTHON_VERSION=3.6.1 | |
wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz | |
tar -xf Python-$PYTHON_VERSION.tar.xz | |
rm Python-$PYTHON_VERSION.tar.xz | |
cd Python-$PYTHON_VERSION/ | |
export PYTHONHOME=/usr/local/ | |
export LD_RUN_PATH=/usr/local/lib/ | |
./configure --enable-loadable-sqlite-extensions --enable-shared --enable-optimizations | |
make | |
sudo make install | |
cd .. | |
sudo rm -Rf Python-$PYTHON_VERSION/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment