python源码编译安装 gb18030_源代码编译安装Python3.5.2

由于没有找到Python3.5的rpm安装包,因此进行源代码编译安装

1、下载Python3.5.2

[root@seastar ~]# cd /usr/local/src

[root@seastar src]#wget wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz

2、查看安装步骤

[root@seastar src]# tar -zxvf Python-3.5.2.tgz

[root@seastar src]# cd Python-3.5.2

[root@seastar Python3.5.2]# cat README | more

On Unix, Linux, BSD, OSX, and Cygwin:

./configure

make

make test

sudo make install

3、安装

[root@seastar src]# ./configure --prerix=/usr/local/python3

...

3、编译

[root@seastar src]# make

...

Python build successfully!

The necessary bits to build these optional modules is not found:

_bz2  _curses  _curses_panel

_dbm  _gdbm  _lzma

_sqlite3  _ssl  _tkinter

readlime  zlib

安装这些可选的开发库(这里忽略了lzma和tkinter)

[root@seastar src]# yum install -y bzip2-devel ncurses-devel gdbm-devel openssl-devel readline-devel zlib-devel sqlite-devel

3、安装

[root@seastar src]# make install

...

4、至此,安装成功

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值