《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:$

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

被折叠的 条评论
为什么被折叠?



