python2.7源码安装方法

2025-10-26 01:53:32

1、安装python之前先安装一些基础软件包

yum -y install xz gcc make gdbm-devel openssl-devel sqlite-devel zlib-devel bzip2-devel

python2.7源码安装方法

2、获取pytho2.7源码包

python2.7源码安装方法

3、解压并进入解压后的目录

tar -xf Python-2.7.12.tar.xz

cd Python-2.7.12

python2.7源码安装方法

4、编译安装

./configure --enable-shared --enable-loadable-sqlite-extensions -with-zlib

python2.7源码安装方法

5、最后再输入命令

make && make install

python2.7源码安装方法

6、查看版本

python -V

python2.7源码安装方法

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢