Created
November 17, 2015 02:15
-
-
Save erictleung/47a701c8b3913f8c4d81 to your computer and use it in GitHub Desktop.
Download and compile Python from source (if user is not root)
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
#!/bin/bash | |
# Shell script to install Python | |
# Note: Change `wget` download file as necessary (also not validated, yet) | |
# https://my.bluehost.com/cgi/help/python-install | |
# download, unzip, and setup Python | |
mkdir ~/python | |
cd ~/python | |
wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz | |
tar zxfv Python-2.7.2.tgz | |
find ~/python -type d | xargs chmod 0755 | |
cd Python-2.7.2 | |
# install Python | |
./configure --prefix=$HOME/python | |
make | |
make install | |
# add to .bashrc | |
# export PATH=$HOME/python/Python-2.7.2/:$PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment