Last active
August 29, 2015 13:57
-
-
Save tomoemon/9827922 to your computer and use it in GitHub Desktop.
Setup Python3 to local
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
#!env sh | |
## -- usage -- | |
## sh setup_python.sh /home/username/local/python34 | |
# sudo yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel | |
# sudo apt-get install libssl-dev openssl libsqlite3-dev | |
PYVER="3.4.2" | |
PYDIR=$1 | |
mkdir ~/download | |
cd ~/download | |
wget --no-check-certificate https://www.python.org/ftp/python/$PYVER/Python-$PYVER.tgz | |
tar zxvf Python-$PYVER.tgz | |
cd Python-$PYVER | |
./configure --enable-shared --prefix=$PYDIR | |
make | |
make install | |
echo "PATH=\$PATH:$1/bin" >> ~/.bashrc | |
source ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment