Skip to content

Instantly share code, notes, and snippets.

@tomoemon
Last active August 29, 2015 13:57
Show Gist options
  • Save tomoemon/9827922 to your computer and use it in GitHub Desktop.
Save tomoemon/9827922 to your computer and use it in GitHub Desktop.
Setup Python3 to local
#!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