青葱岁月易过 世间繁华千年!
今天开始在博客园混!在飞火流星的六月,这个激情的日子刚好用来铭记!
不多说看代码!
1 下载软件 2 wget https://www.python.org/ftp/python/3.6.3/python-3.6.3.tgz 安装依赖 3 yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel 4 yum install xz gcc zlib zlib-devel wget sqlite-devel openssl-devel -y 5 解压软件 xz -d Python-3.6.5.tar.xz 6 tar -xvf Python-3.6.5.tar 7 复制软件 cp -ap Python-3.6.5 /usr/ 8 cd /Python-3.6.5/ 9 安装软件 ./configure --prefix=/usr/Python-3.6.5/10 make11 make install12 软链接 cd /usr/bin13 mv python python.bak14 ln -s /usr/Python-3.6.5/bin/python3.6 /usr/bin/python15 16 修改默认python 避免yum出错 vi /usr/libexec/urlgrabber-ext-down17 将 /usr/bin/python 改为 /usr/bin/python2.7