在Centos6下面安装Python3.4
yum源里头好像没有python3.4
在Python的官网下载Python3.4的源代码
然后:
- 安装依赖包:
- yum groupinstall "Development tools"
- yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
- 解压缩下载的Python源码:
- tar xvf Python-3.4.5.tgz
- cd Python-3.4.5.tgz
- 编译:
- ./configure --prefix=/usr/local
- make
- make install
- 确认版本信息:
- python3 --version 〉〉 Python 3.4.5
- OK!
参考资料:http://blog.csdn.net/ucan23/article/details/42777913