Last active
December 26, 2015 14:19
-
-
Save huahang/7164238 to your computer and use it in GitHub Desktop.
Install Python from Source for CentOS 6
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
# User specific environment and startup programs | |
export PATH=$HOME/bin:$PATH | |
export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH | |
export VIRTUAL_ENV_DISABLE_PROMPT=1 | |
source $HOME/.python-venv/bin/activate |
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
sudo yum -y install giflib-devel libXpm-devel libtiff-devel libjpeg-devel expat-devel | |
sudo yum -y install gcc gdbm-devel readline-devel ncurses-devel libpng-devel | |
sudo yum -y install zlib-devel bzip2-develsqlite-devel db4-devel tk-devel wget | |
sudo yum -y install bluez-libs-devel make perl-devel curl-devel openssl-devel | |
sudo yum -y groupinstall "Development Tools" | |
mkdir -p src/python | |
cd src/python | |
wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz | |
tar zxf Python-2.7.6.tgz | |
cd Python-2.7.6/ | |
./configure --prefix=$HOME --with-threads --enable-shared | |
make -j8 | |
make install | |
cd src/python | |
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | |
python ez_setup.py | |
easy_install pip | |
pip install virtualenv | |
virtualenv $HOME/.python-venv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment