centos7.5安装python3.7

本文档由马帅撰写,详细介绍了在CentOS 7.5 64位系统上安装Python 3.7的过程,强调了libffi-devel和readline-devel这两个依赖包的重要性,以避免安装过程中出现错误和使用Python shell时的不便。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

《Centos安装Python3.7》

mail:mslinux@163.com
文档作者:马帅
系统环境:CentOS 7.5 64.bit

安装依赖包

[root@localhost ~]# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel libffi-devel readline-devel 

libffi-devel这个包很重要的没有这个包make install会报错的
readline-devel 是防止进入python的shell时返回键不能用

安装python3.7

[root@localhost ~]# wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz
[root@localhost ~]# tar Jxvf Python-3.7.1.tar.xz
[root@localhost ~]# cd Python-3.7.1/
[root@localhost Python-3.7.1]# ./configure --prefix=/usr/local/python3 && make && make install
[root@localhost Python-3.7.1]# cd
[root@localhost ~]# vim .bash_profile 
#.bash_profile
 Get the aliases and
functions
if [ -f ~/.bashrc ]; then
         . ~/.bashrc
fi
#User specific
environment and startup programs
PATH=$PATH:$
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值