Centos7安装Python3.7-成都创新互联网站建设

关于创新互联

多方位宣传企业产品与服务 突出企业形象

公司简介 公司的服务 荣誉资质 新闻动态 联系我们

Centos7安装Python3.7

# 更改yum源
cd /etc/yum.repos.d 
mv CentOS-Base.repo CentOS-Base.repo.bak
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all 
yum makecache
# 安装依赖、下载安装Python
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 libffi-devel
wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz
tar xf Python-3.7.2.tgz
cd Python-3.7.2
./configure --prefix=/usr/local/python3
echo $?
make && make install
echo $?
ln -s /usr/local/python3/bin/python3.7 /usr/local/bin/python3.7
# 检查安装
python2.7和3.7版本同时安装在系统中
python -V
Python 2.7.5
python3.7 -V
Python 3.7.2

分享标题:Centos7安装Python3.7
网站链接:http://kswsj.cn/article/pdhiho.html

其他资讯