Python 官方文档:入门教程 => 点击学习
# 更改yum源 cd /etc/yum.repos.d mv Centos-Base.repo CentOS-Base.repo.bak wget -O CentOS-Base.repo Http://mirrors.aliyun.co
# 更改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
--结束END--
本文标题: Centos7 安装Python3.7
本文链接: https://lsjlt.com/news/187288.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0