1. Installation of development tools and related compiled and installed components
# yum-y Groupinstall "Development Tools" # Yum-y install openssl-devel zlib-devel ncurses-devel bzip2-devel readline-deve Llibtool-ltdl-devel Sqlite-devel Tk-devel Tcl-devel
2. Download and extract the latest Python 2.7.13 source code from Sohu image station
# wget http://mirrors.sohu.com/python/2.7.13/Python-2.7.13.tgz # TAR-ZXVF Python-2.7.13.tgz
3. Compile and install Python2.7.13
# CD python-2.7.13#./configure--prefix=/usr/local #安装到/usr/local directory # make && make install# do clean #清除之前编译的 Executable files and configuration # make Distclean #清除所有生成的文件
4. Point the System python command to Python 2.7
# mv/usr/bin/python/usr/bin/python2.6.6 #重命名旧版本 # ln-s/usr/local/bin/python2.7/usr/bin/python #创建软连接
5. View the latest Python version
# python-v return value: Python 2.7.13
6, Installation Setuptools
6.1, enter Https://pypi.python.org/pypi/setuptools download the latest version of Setuptools.zip and upload
6.2. Unzip the file
# Unzip Setuptools-36.0.1.zip
6.3, Installation Setuptools
# cd setuptools-36.0.1# python setup.py install
6.4. View the installed version
# Easy_install--version return value: Setuptools 36.0.1 from/usr/local/lib/python2.7/site-packages/ Setuptools-36.0.1-py2.7.egg (Python 2.7)
7. Install Pip
7.1, enter HTTPS://PYPI.PYTHON.ORG/PYPI/PIP download the latest version of pip.tar.gz and upload
7.2. Unzip the file
# TAR-ZXVF Pip-9.0.1.tar.gz
7.3. Install Pip
# cd pip-9.0.1# python setup.py install
7.4. View the installed version
# pip-v return value: Pip 9.0.1 From/usr/local/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg (Python 2.7)
8, installation Selenium
# pip Install Selenium
This article is from the "as1024" blog, make sure to keep this source http://as1024.blog.51cto.com/12241298/1940915
Centos6.5 python2.6.6 upgrade 2.7.13, install Setuptools and PIP