понедельник, 8 апреля 2013 г.

RHEL 6 / Centos 6 and Python 3

Here are some instructions, how to install Python 3 on RHEL 6 / Centos 6 .

------------------------------------------------------------------------------------

yum update
yum groupinstall "Development tools"
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
cd /opt
wget http://python.org/ftp/python/3.3.1/Python-3.3.1.tar.bz2
tar xf Python-3.3.1.tar.bz2
rm Python-3.3.1.tar.bz2
cd Python-3.3.1/
./configure --prefix=/usr/local
make && make altinstall
cd ..
rm -rf ./Python-3.3.1
wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.36.tar.gz
tar xvf distribute-0.6.36.tar.gz
cd distribute-0.6.36
python3.3 setup.py install
easy_install-3.3 virtualenv
easy_install-3.3 pip
cd ..
rm -rf ./distribute-0.6.36*

Warning - "altinstall" is very important


Safely usage different versions of python on the same machine:

virtualenv-3.3 --distribute projectfolder
source projectfolder/bin/activate

deactivate

Комментариев нет:

Отправить комментарий