Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.