centos6.5安装python3

安装开发工具

yum groupinstall "Development tools"
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel \
 sqlite-devel readline-devel tk-devel

下载安装python

http://www.python.org/download/releases/

wget http://www.python.org/ftp/python/3.3.4/Python-3.3.4.tar.xz
tar xf Python-3.3.4.tar.xz
cd Python-3.3.4
./configure --prefix=/opt/python3
make && make install

下载安装pip

http://www.pip-installer.org/

wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
/opt/python3/bin/python3 get-pip.py

下载安装virtualenv

/opt/python3/bin/pip install virtualenv
/opt/python3/bin/virtualenv --distribute /pyproject
/pyproject/bin/pip install package