Last active
August 29, 2015 14:18
-
-
Save adoc/1dc0fdad8db0d76888a5 to your computer and use it in GitHub Desktop.
Python 3.4 install
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 | |
# Python 3.4 build/install | |
_py34_install_cwd="`pwd`" # Save current directory. | |
yum -y install wget | |
yum -y install openssl-devel | |
yum -y install zlib-devel | |
yum -y install bzip2-devel | |
yum -y install readline-devel | |
yum -y groupinstall development | |
cd /tmp | |
wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz | |
tar xzvf Python-3.4.3.tgz | |
cd Python-3.4.3 | |
./configure --prefix=/opt/python3.4 | |
code=$? | |
if [ $code -ne 0 ];then | |
exit 1 | |
fi | |
make && make install | |
code=$? | |
if [ $code -ne 0 ];then | |
cd $_py34_install_cwd | |
exit 1 | |
fi | |
# Copy binary to path. | |
cp /opt/python3.4/bin/python /usr/bin/python3.4 | |
# Install setuptools | |
cd /tmp | |
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-5.1.tar.gz#md5=c26e47ce8d7b46bd354e68301f410fb8 | |
tar xvzf setuptools-5.1.tar.gz | |
cd setuptools-5.1 | |
/usr/bin/python3.4 setup.py install | |
cp /opt/python3.4/bin/easy_install3 /usr/bin/easy_install3.4 | |
# Install pip | |
/usr/bin/easy_install3.4 -ZUN pip | |
cp /opt/python3.4/bin/pip3.4 /usr/bin/pip3.4 | |
# Install virtualenv | |
/usr/bin/pip3.4 install virtualenv | |
cp /opt/python3.4/bin/virtualenv-3.4 /usr/bin/virtualenv3.4 | |
cd $_py34_install_cwd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment