环境:centos6.3
版本:python2.6
cd /home
wget https://www.python.org/ftp/python/3.4.8/Python-3.4.8.tar.xz
tar -Jxvf Python-3.4.8.tar.xz
cd Python-3.4.8
mkdir /usr/local/python3.4.8
./configure --prefix=/usr/local/python3.4.8/
make
make install
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install virtualenv
virtualenv envpy3 -p /usr/local/python3.4.8/bin/python3.4
source envpy3/bin/activate ##激活虚拟环境
deactivate ##退出