OneCode-cucldk.com

当前位置:首页 - 系统软件 - 正文

原作者:https://github.com/LunacyZeus/Python3.6-for-Centos7.0

Python3.6-for-Centos7.0

这个脚本能让你在Centos7.0下搭建Python3.6开发环境(与网上的不同,这个包含许多必需库,不会中途再次重新编译)

使用教程:

wget --no-check-certificate https://raw.githubusercontent.com/LunacyZeus/Python3.6-for-Centos7.0/master/install.sh && sh install.sh

修改后yum不可用解决方案:

nano /usr/bin/yum 然后将首行的 #!/usr/bin/python 改为 #!/usr/bin/python2.6.6

源码:

#Centos 7.0 安装Python3.6脚本
#作者: LunacyZeus
#Git主页: https://github.com/LunacyZeus

echo "Python3.6 for Centos 7.0 一键安装脚本\nGitHub主页地址: https://github.com/LunacyZeus\n这个脚本是我在经过多次测试后做出来的,安装了Python要用的所有的必需库(如有缺少,请指出,谢谢!),不会出现在使用中需要某些库而重新编译安装Python的蛋疼事情\n\nPs: 本脚本在腾讯云亲测可用\n  遇到问题请在Github提交BUG"

read -p "请按任意键以继续" var


echo "Let's Go..."

echo "安装开发环境工具..."
yum groupinstall -y "Development tools"

echo "安装编译Python必需工具..."
yum install -y nano nginx sqlite-devel screen ncurses-devel ncurses-libs zlib-devel mysql-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-develtk-devel gdbm-devel db4-devel libpcap-devel xz-devel openssl-devel

echo "获取并解压Python3.6源码..."
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz && tar xvJf Python-3.6.0.tar.xz && cd Python-3.6.0

echo "构建Python3.6..."
./configure
echo "编译安装Python3.6..."
make&& make install

echo "好了,你的Python3.6 for Centos7.0之旅正式开始啦~"

本文来源:OneCode

本文地址:https://cucldk.com/post/centos7-to-python3.html

版权声明:如无特别注明,转载请注明本文地址!