在Linux CentOS 6.6上安装Python 2.7.9

查看python安装版本

python -V

yum中最新的也是Python 2.6.6,所以只能下载Python 2.7.9的源代码自己编译安装。

操作步骤如下:

1)安装devtoolset

yum groupinstall "Development tools" -y

2)安装编译Python需要的包包

yum install zlib-devel -y
yum install bzip2-devel -y
yum install openssl-devel -y
yum install ncurses-devel -y
yum install sqlite-devel -y

3)下载并解压Python 2.7.9的源代码

cd /data
wget --no-check-certificate https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz
tar -xvf Python-2.7..tar.xz
cd Python-2.7.

4)编译与安装Python 2.7.9

./configure --prefix=/usr/local

make && make altinstall

5)将python命令指向Python 2.7.9

ln -s /usr/local/bin/python2.7 /usr/local/bin/python

6)检查Python版本

sh   -- 进入shell
sh-4.1# python -V   --查看python版本
Python 2.7.9
exit  -- 退出shell

7 ) 更新环境变量

python -V    --此时还是Python 2.6.6
source /etc/profile   --刷新环境变量
python -V    --变成Python 2.7.9

【参考资料】

Installing python 2.7 on centos 6.3

[转]在Linux CentOS 6.6上安装Python 2.7.9的更多相关文章

  1. 在Linux CentOS 6.6上安装Python 2.7.9

    CentOS 6.6自带的是Python 2.6.6,而编译llvm需要Python 2.7以上. checking for python... /usr/bin/python checking fo ...

  2. 在Linux Centos 7.2 上安装指定版本Docker。

    相关资料链接: https://docs.docker.com/install/linux/docker-ce/centos/#install-docker-ce 先清空下“历史” yum remov ...

  3. 在Linux Centos 7.2 上安装指定版本Docker 17.03

    相关资料链接: https://docs.docker.com/install/linux/docker-ce/centos/#install-docker-ce 先清空下“历史” yum insta ...

  4. 在Linux CentOS 6.6上安装RedisLive

    Real time dashboard for redis 安装必须软件 1.安装pip到指定的python版本下面: curl -O https://bootstrap.pypa.io/get-pi ...

  5. CentOS 6.5上安装Python 2.7.9

    CentOS 6.6自带的是Python 2.6.6,而编译llvm需要Python 2.7以上. checking for python... /usr/bin/python checking fo ...

  6. 如何在centos 7.4 上安装 python 3.6

    yum -y install https://centos7.iuscommunity.org/ius-release.rpmyum -y install python36uyum -y instal ...

  7. 在 CentOS 7.3 上安装 nginx 服务为例,说明在 Linux 实例中如何检查 TCP 80 端口是否正常工作

    CentOS 7.3 这部分以在 CentOS 7.3 上安装 nginx 服务为例,说明在 Linux 实例中如何检查 TCP 80 端口是否正常工作. 登录 ECS 管理控制台,确认实例所在安全组 ...

  8. CentOS 6.5上安装MySQL-Cluster

    参考博文: CentOS 6.2下MySQL Cluster 7.2 配置数据库集群 CentOS 6.5上安装MySQL-Cluster 7.3.4过程笔记--下一步学习 MySQL Cluster ...

  9. 记录CentOS 7.4 上安装MySQL&MariaDB&Redis&Mongodb

    记录CentOS 7.4 上安装MySQL&MariaDB&Redis&Mongodb 前段时间我个人Google服务器意外不能用,并且我犯了一件很低级的错误,直接在gcp讲服 ...

随机推荐

  1. 【Nodejs】使用request批量下载MP3,文件数量内容都没问题

    看来request远强于http.request是毋庸置疑的了. 代码如下: //====================================================== // 喜 ...

  2. editplus教程

    Editplus 3.0 开发ext 教程 使用Editplus配置轻型的PHP调试环境 Editplus已经使用了很多年,一直很喜欢这个小巧.精致的文本编辑器,比起ZenStudio这样庞大的IDE ...

  3. SuperMap开发入门1——资源下载

    前言(废话) 由于项目需要,我们将被改用超图(SuperMap)平台进行GIS开发.记忆中,我还是在学生时代使用过超图软件5.0版本,安装包只有50M,这也是超图与学校有合作关系的缘故. 在以后的学习 ...

  4. ArcGIS10.4 Runtime Error R6034

    现在甲方采购的ArcGIS Desktop正版,一般都是较高的版本(10.4或10.4.1),但10.4经常报出C++ Runtime R6034错误. 问题 "Microsoft Visu ...

  5. 【转】application.properties 常见配置

    Various properties can be specified inside your application.properties/application.yml file or as co ...

  6. ashx 一般处理程序中使用 Session

    项目中,调用 ashx 一般处理程序获取行政区划Json数据,在 ashx 里面有用到Session,但是总无法获取 Session . 查阅资料得知 ashx 一般处理程序要使用 Session,必 ...

  7. Android 之 Fagment 完全解析

    Android 上的界面展示都是通过 Activity 实现的,Activity 非常常用,不再赘述.但是 Activity 也有它的局限性,同样的界面在手机上显示可能很好看,在平板上就未必了,因为平 ...

  8. Go语言使用PostgreSQL数据库

    Go语言使用PostgreSQL数据库 PostgreSQL和MySQL比较,它更加庞大一点,因为它是用来替代Oracle而设计的.所以在企业应用中采用PostgreSQL是一个明智的选择. 现在My ...

  9. MapReduce实现大矩阵乘法

    来自:http://blog.csdn.net/xyilu/article/details/9066973 引言 何 为大矩阵?Excel.SPSS,甚至SAS处理不了或者处理起来非常困难,需要设计巧 ...

  10. C# ListView用法

    ListView是个较为复杂的控件       1.定义   把它拽进来,系统会自动在Designer.cs里添加一个  this.listView1 = new System.Windows.For ...