Skip to content

Instantly share code, notes, and snippets.

@Dan0sz
Created October 21, 2018 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dan0sz/e01fae77ff29a8f7131e526388bb659a to your computer and use it in GitHub Desktop.
Save Dan0sz/e01fae77ff29a8f7131e526388bb659a to your computer and use it in GitHub Desktop.
Install Python 2.7.x from Source with sqlite3 included
# Prerequisites for Python 2.7.x
apt-get update
apt-get install build-essential checkinstall
apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
# Download and extract Python 2.7.13
cd /usr/src
curl -O https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz
tar xvfz Python-2.7.13.tgz
# Edit setup.py before compiling and add the output of `which sqlite3` to an array called sqlite_inc_paths
nano /usr/src/Python-2.7.13/setup.py
# Compile Python
cd Python-2.7.13
sudo ./configure --enable-optimizations
sudo make altinstall
# Check Version
python2.7 -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment