Centos6.8安装python环境
2021-07-08 11:07
标签:自带 check 编译安装 a20 cat 命令 water src png #yum install tk-devel -y #rm –rf python #ln -s /usr/local/bin/python2.7 /usr/bin/python #python –version 如果对此有兴趣,请扫下面二维码免费获取更多详情 Centos6.8安装python环境 标签:自带 check 编译安装 a20 cat 命令 water src png 原文地址:http://blog.51cto.com/11233498/2169991
1.检查系统python
CentOS 6.8自带的是Python 2.6.6,yum中最新的也是Python 2.6.6,只能下载Python 2.7.12的源代码自己编译安装。如下图:
#yum -y groupinstall "Development tools"
#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
#yum install tcl-devel –y
4.下载并解压Python 2.7.12的源代码
#cd /opt
#wget --no-check-certificate https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tar.xz
#tar xf Python-2.7.12.tar.xz
#cd Python-2.7.12
#tar xf Python-2.7.12.tar.xz
#cd Python-2.7.12
#./configure --prefix=/usr/local
#make && make install
6.将python命令指向Python 2.7.12
cd /usr/bin
由上图所示 python2.7安装完成
下一篇:线程的暂停与恢复