Last active
August 29, 2015 14:03
-
-
Save mfurlend/2f3884dd24aa0efcbcb4 to your computer and use it in GitHub Desktop.
Install Python 2.7.6 alongside default on Centos 6.5 x86_64 with conflicting 32 bit libz library in default path, then setup virtualenv and configure a directory
This file contains hidden or 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
| #BUILD AND INSTALL PYTHON | |
| su | |
| yum groupinstall -y development | |
| yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel tk-devel gdbm-devel ncurses-devel readline-develxz-libs | |
| wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz --no-check-certificate | |
| xz -d Python-2.7.6.tar.xz | |
| tar -xvf Python-2.7.6.tar | |
| cd Python-2.7.6 | |
| mkdir ~/libzbackup | |
| mv /usr/local/lib/libz* ~/libzbackup | |
| #./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/lib64, -Wl,-rpath /usr/local/lib" | |
| sudo ./configure | |
| sed -i 's/#zlib zlibmodule\.c/zlib zlibmodule.c/' Modules/Setup | |
| make -s | |
| make altinstall | |
| #INSTALL SETUPTOOLS, PIP, AND VIRTUALENV | |
| wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz | |
| tar -xvf setuptools-1.4.2.tar.gz | |
| cd setuptools-1.4.2 | |
| python2.7 setup.py install | |
| curl https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py | python2.7 - | |
| pip2.7 install virtualenv | |
| #CREATE A PYTHON 2.7 SANDBOX IN /home/dev | |
| mkdir /home/dev | |
| virtualenv-2.7 /home/dev/python27_sandbox | |
| #GO INTO THE SANDBOX AND INSTALL NUMPY | |
| cd /home/dev/python27_sandbox | |
| source ./bin/activate | |
| pip install numpy | |
| #MAKE ALL FILES HERE OWNED BY daemon:dev | |
| mount -o remount,acl / | |
| chown daemon:dev /home/dev -R | |
| setfacl -d -m g:dev:rwX,o::- /home/dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment