centos系统下安装python
2011-09-14 13:48
696 查看
下载:
wget -c http://www.python.org/ftp/python/3.1.3/Python-3.1.3.tar.bz2
解压编译安装:
$ tar –jxvf Python-2.5.2.tar.bz2
$ cd Python-2.5.2
$ ./configure
$ make
$ make install
由于centos默认安装有2.4,直接输入python进行的是2.4
# python
Python 2.4.3 (#1, Dec 11 2006, 11:38:52)
[GCC 4.1.1 20061130 (Red Hat 4.1.1-43)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>>
如下修改可以解决
cd /usr/bin
ll |grep python
ln -s /root/Python-3.1.3/python ./python ///root/Python-3.1.3/python为解压目录
现在输入python显示为3.1的了
[root@chxy bin]# python
Python 3.1.3 (r313:86834, Jan 2 2011, 02:12:38)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>>
参考
http://www.4ucode.com/Study/Topic/981662
wget -c http://www.python.org/ftp/python/3.1.3/Python-3.1.3.tar.bz2
解压编译安装:
$ tar –jxvf Python-2.5.2.tar.bz2
$ cd Python-2.5.2
$ ./configure
$ make
$ make install
由于centos默认安装有2.4,直接输入python进行的是2.4
# python
Python 2.4.3 (#1, Dec 11 2006, 11:38:52)
[GCC 4.1.1 20061130 (Red Hat 4.1.1-43)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>>
如下修改可以解决
cd /usr/bin
ll |grep python
ln -s /root/Python-3.1.3/python ./python ///root/Python-3.1.3/python为解压目录
现在输入python显示为3.1的了
[root@chxy bin]# python
Python 3.1.3 (r313:86834, Jan 2 2011, 02:12:38)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>>
参考
http://www.4ucode.com/Study/Topic/981662
相关文章推荐
- python监控linux系统信息(流量/内存/cpu/负载/磁盘/运转时间) Centos安装X Window和桌面环境
- Linux系统Centos以及Ubuntu下安装新的python版本
- CentOS 6 安装 python 2.7 (系统自带Python2.6.6) (附easy_install安装, pip安装)
- 关于Centos Linux系统安装Python的问题
- linux上python2.7.11 和 3.6.2 编译安装时系统要预先安装的包(centos 用 yum安装即可)
- CentOS 7安装Python3.6过程(让linux系统共存Python2和Python3环境)
- centos系统下为python安装MySQLdb库
- Linux(CentOS7.2)下Python3安装配置和系统原python2共存以及Django配置搭建
- CENTOS 6.5 安装 Python 2.7 总结 系统包含python2.6
- CentOS 7安装Python3.6过程(让linux系统共存Python2和Python3环境)
- Python之——病毒检测模块pyClamad的安装(基于CentOS 6.5系统)
- Linux系统(CentOS)安装Python
- 在centos 6系统中安装python2.7
- centos系统下为python安装MySQLdb库
- centos7 安装python2.6,与系统自带的python2.7共存
- Centos7 mini系统安装Python3的方法
- CentOS 7-(64位)系统下安装Anaconda(Python3.x)及pip使用
- centos6.5系统用Python3.6.3安装pip
- Linux基本操作系列(三):在CentOS 6.8系统上安装MySQL 5.7
- CentOS 7.3.1611系统安装配置图解教程