Centos 6.5 python 2.6.6 升级到 2.7.3,并安装easy_install和pip工具过程,centoseasy_install,一、使用说明: 一些


一、使用说明:


一些原因需要将centos 6.5系统自带的python 2.6.6升级为2.7版本,下面是具体升级过程,记录一下!


二、实验环境:

系统:centos 6.5 final

python版本:

#python-VPython2.6.6


三、安装配置:


1、下载Python-2.7.3

#cd/home/workspace/#wgethttp://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2

2、解压并安装

#tarxfPython-2.7.3.tar.bz#cdPython-2.7.3#./configure#makeall#makeinstall#makeclean#可有可无#makedistclean#可有可无


3、替换系统默认python版本

#mv/usr/bin/python/usr/bin/python2.6.6#ln-s/usr/local/bin/python2.7/usr/bin/python


4、查看系统版本

#python-VPython2.7.3


5、替换yum程序使用的python版本

#whichyum/usr/bin/yum#vim/usr/bin/yum修改内容:#!/usr/bin/python改为#!/usr/bin/python2.6.6

让yum使用老的版本的python


6、安装easy_install

#cd/home/workspace#wgethttps://pypi.python.org/packages/ba/2c/743df41bd6b3298706dfe91b0c7ecdc47f2dc1a3104abeb6e9aa4a45fa5d/ez_setup-0.9.tar.gz#tarxfsetup-0.9.tar.gz#cdez_setup-0.9&&pythonez_setup.py#whicheasy_install/usr/local/bin/easy_install

安装easy_install完成


7、安装pip

#yuminstall-ypython-urllib3#easy_installpip#piplistdistribute(0.6.14)pip(9.0.1)setuptools(0.6rc11)

pip安装完成



ok,到此全部安装完成!!!

本文出自 “郑小明的技术博客” 博客,请务必保留此出处http://zhengmingjing.blog.51cto.com/1587142/1918263

Centos 6.5 python 2.6.6 升级到 2.7.3,并安装easy_install和pip工具过程

评论关闭