[转]在Linux CentOS 6.6上安装Python 2.7.9
在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的更多相关文章
- 在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 ...
- 在Linux Centos 7.2 上安装指定版本Docker。
相关资料链接: https://docs.docker.com/install/linux/docker-ce/centos/#install-docker-ce 先清空下“历史” yum remov ...
- 在Linux Centos 7.2 上安装指定版本Docker 17.03
相关资料链接: https://docs.docker.com/install/linux/docker-ce/centos/#install-docker-ce 先清空下“历史” yum insta ...
- 在Linux CentOS 6.6上安装RedisLive
Real time dashboard for redis 安装必须软件 1.安装pip到指定的python版本下面: curl -O https://bootstrap.pypa.io/get-pi ...
- 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 ...
- 如何在centos 7.4 上安装 python 3.6
yum -y install https://centos7.iuscommunity.org/ius-release.rpmyum -y install python36uyum -y instal ...
- 在 CentOS 7.3 上安装 nginx 服务为例,说明在 Linux 实例中如何检查 TCP 80 端口是否正常工作
CentOS 7.3 这部分以在 CentOS 7.3 上安装 nginx 服务为例,说明在 Linux 实例中如何检查 TCP 80 端口是否正常工作. 登录 ECS 管理控制台,确认实例所在安全组 ...
- CentOS 6.5上安装MySQL-Cluster
参考博文: CentOS 6.2下MySQL Cluster 7.2 配置数据库集群 CentOS 6.5上安装MySQL-Cluster 7.3.4过程笔记--下一步学习 MySQL Cluster ...
- 记录CentOS 7.4 上安装MySQL&MariaDB&Redis&Mongodb
记录CentOS 7.4 上安装MySQL&MariaDB&Redis&Mongodb 前段时间我个人Google服务器意外不能用,并且我犯了一件很低级的错误,直接在gcp讲服 ...
随机推荐
- [Algorithm] How many meeting rooms needed?
Give you set of meetings start time and end time, count how many meeting rooms needed. For example: ...
- 【POJ 3071】 Football(DP)
[POJ 3071] Football(DP) Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4350 Accepted ...
- Provide your license server administrator with the following information.error code =-42,147
ArcEngine应用程序开发中,许可不必不可少的.一般采取两种方式来获取许可——License控件和AoInitialize类,但今天在VS2010打开程序时,隔一会弹出错误窗口:Provide y ...
- 使用Jmeter对API进行性能测试
先补充刚才测试的部分截图余下,后续详细补充内容. API Test.jmx 如下: <?xml version="1.0" encoding="UTF-8" ...
- Linux中查看系统版本的方法
一.Linux系统中,XShell连接进去之后,查看系统版本的方法如下: 1.查找release文件 find /etc/ -name *-release 例如: 或者 2.查看release文件 c ...
- Angularjs乱记
http://www.cnblogs.com/floor/p/6652313.html 在指令中使用filter DI规则 AngularJS注入规则 数据绑定 http://www.cnblogs. ...
- 算法笔记_223:打印回型嵌套(Java)
目录 1 问题描述 2 解决方案 1 问题描述 *********** * * * ******* * * * * * * * *** * * * * * * * * * * *** * * * ...
- Android设备广告投放解决方案——大量网络图片、多个网络视频的轮播、缓存与更新
转载请注明原文地址:http://www.cnblogs.com/ygj0930/p/7742996.html 一:业务场景 基于Android系统的设备上投放广告,诸如:地铁广告屏.自助服务机器上的 ...
- DWR组件——基于远程过程调用实现Ajax
转载请注明原文地址:http://www.cnblogs.com/ygj0930/p/6686115.html 一:DWR的用途 DWR(Direct Web Remoting)是一个Web远程调用 ...
- cocos2d-js Shader系列3:多重纹理 multiple textures multiple samplers
上一篇,我们学习了怎么便捷的控制sprite的颜色,而这个都是默认一个texture的,如果要实现类似mask的效果,或者更个性化的多纹理效果,怎么实现呢? 这就是这一节需要介绍的内容. 例如上图的效 ...