Last active
July 17, 2018 07:50
-
-
Save ShahriyarR/a5f0f1d6b68bf77d7a291340d713afa0 to your computer and use it in GitHub Desktop.
Installing Python from source
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
# Get specific version of Python | |
wget https://www.python.org/ftp/python/3.5.3/Python-3.5.3.tgz | |
tar -xf Python-3.5.3.tgz | |
cd Python-3.5.3 | |
-- Open Setup.dist file and search for zlib, uncomment zlib notes: | |
* nano Modules/Setup.dist | |
# See http://www.gzip.org/zlib/ | |
zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz | |
-- Also search for ssl and uncomment ssl section: | |
# socket line above, and possibly edit the SSL variable: | |
SSL=/usr/local/ssl | |
_ssl _ssl.c \ | |
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ | |
-L$(SSL)/lib -lssl -lcrypto | |
# Create folder where you want to install Python | |
mkdir /opt/Python-3.5.3 | |
# Add this new folder path as --prefix to configure | |
./configure --prefix=/opt/Python-3.5.3 --enable-optimizations | |
make | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add
--enable-optimizations
flag :)