在python2中编译bz2支持 [英] Compiling bz2 support in python2

查看:101
本文介绍了在python2中编译bz2支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有

$ lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 6.6 (Final)
Release:    6.6
Codename:   Final

$ ls -l /lib64/libbz2.so.1
lrwxrwxrwx. 1 root root 15 May 25  2016 /lib64/libbz2.so.1 -> libbz2.so.1.0.4

我做到了:

Python-2.7.12 $ export LDFLAGS="-L/lib64";  ./configure --prefix=/some/dir

Python-2.7.12 $ make

并得到:

Python build finished, but the necessary bits to build these modules were not found:
_sqlite3           _tkinter           bsddb185
bz2                dl                 imageop

如何是否构建对bz2模块的支持?

How do I build support for bz2 module?

推荐答案

wget http://bzip.org/1.0.6/bzip2-1.0.6.tar.gz
tar -xvf bzip2-1.0.6.tar.gz
cd bzip2-1.0.6
make -f Makefile-libbz2_so
make
make install PREFIX=/some/dir

cd Python-2.7.3
./configure --prefix=/some/dir
make install

这对我有用。

从此处复制了说明:使用bz2支持编译Python

这篇关于在python2中编译bz2支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆