Skip to content

Instantly share code, notes, and snippets.

@cedricbonhomme
Last active December 11, 2019 10:11
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cedricbonhomme/35e81e295fd4baed83d6ccb2cb9fde79 to your computer and use it in GitHub Desktop.
Save cedricbonhomme/35e81e295fd4baed83d6ccb2cb9fde79 to your computer and use it in GitHub Desktop.
How I install Python on a Debian system
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