wget http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz
xz -d Python-2.7.8.tar.xz
tar -xvf Python-2.7.8.tar
9.编译
12345678910111213
# Enter the directory:
cd Python-2.7.8
# Run the configure:
./configure --prefix=/usr/local
# compile and install it:
make
make altinstall
# Checking Python version:
[root@nicetry ~]# python2.7 -V
Python 2.7.8
If you need set PATH variable check the line bellow:
1
export PATH="/usr/local/bin:$PATH"
10 安装 pip 和 virtualenv
Python安装是否结束了,我们是否遗漏了什么,对!我们需要 pip and virtualenv.
Install setuptools
12345678
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz
# Extract the files:
tar -xvf setuptools-1.4.2.tar.gz
cd setuptools-1.4.2
# Install setuptools using the Python 2.7.8:
python2.7 setup.py install