centos7 安装python3.6 脚本
Posted 宇宙中漂浮的猫
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos7 安装python3.6 脚本相关的知识,希望对你有一定的参考价值。
shell 脚本自动安装python3
# /bin/bash cd /opt yum groupinstall "Development tools" -y 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 wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz if [ -f /opt/Python-3.6.6.tar.xz ];then tar -xf Python-3.6.6.tar.xz cd /opt/Python-3.6.6 ./configure --prefix=/usr/local/python3 --enable-optimizations if [ $0 == 0 ];then make && make install ln -s /usr/local/python3/bin/python3 /usr/bin/python3 ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3 else echo "./configure 出现错误" fi else echo "下载失败" fi
以上是关于centos7 安装python3.6 脚本的主要内容,如果未能解决你的问题,请参考以下文章