Python
2016-04-11 21:09
603 查看
在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 for python >= 2.7... not found configure: error: found python 2.6.6 (/usr/bin/python); required >= 2.7
yum中最新的也是Python 2.6.6,只能下载Python 2.7.9的源代码自己编译安装。
操作步骤如下:
1)安装devtoolset
yum groupinstall "Development tools"
2)安装编译Python需要的包包
yum install zlib-devel yum install bzip2-devel yum install openssl-devel yum install ncurses-devel yum install sqlite-devel
3)下载并解压Python 2.7.9的源代码
cd /opt wget --no-check-certificate https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz tar xf Python-2.7.9.tar.xz cd Python-2.7.9
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 sh-4.1# python -V Python 2.7.9
相关文章推荐
- python 的拷贝、深度拷贝及内存管理
- python 下载文件汇总
- python浓缩(7)映射和集合类型
- python学习9-语句
- python笔记 - 高级属性(20160411)
- Python2.7 smtplib发送带附件邮件报错STARTTLS解决方法
- Python2.7 smtplib发送带附件邮件报错STARTTLS解决方法 推荐
- python 模拟登录
- 机器学习/数据挖掘学习资源
- python命令行自动补全
- python小模块学习---filecmp 文件比较
- python模块学习————os
- Python args kwargs
- Python爬虫学习系列教程
- 【自己总结】Sublime2编译Python程序EOFError:EOF when reading a line解决方法
- Python Tutorial
- python学习笔记1
- Python常用的爬虫技巧
- Python urllib简单使用
- python的numpy和matplotlib包的安装