Created
October 21, 2018 18:52
-
-
Save Dan0sz/e01fae77ff29a8f7131e526388bb659a to your computer and use it in GitHub Desktop.
Install Python 2.7.x from Source with sqlite3 included
This file contains hidden or 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
# 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