Python#39;s bz2 module not compiled by default(Python 的 bz2 模块默认不编译)
问题描述
看来Python 2.6.1默认不从源码编译bz2库.
It seems that Python 2.6.1 doesn't compile bz2 library by default from source.
我没有 lib-dynload/bz2.so
I don't have lib-dynload/bz2.so
添加它的最快方法是什么(无需从头开始安装 Python)?
What's the quickest way to add it (without installing Python from scratch)?
操作系统是 Linux 2.4.32-grsec+f6b+gr217+nfs+a32+fuse23+tg+++opt+c8+gr2b-v6.194 #1 SMP Tue Jun 6 15:52:09 PDT 2006 i686 GNU/Linux
OS is Linux 2.4.32-grsec+f6b+gr217+nfs+a32+fuse23+tg+++opt+c8+gr2b-v6.194 #1 SMP Tue Jun 6 15:52:09 PDT 2006 i686 GNU/Linux
IIRC 我只使用了 --prefix 标志.
IIRC I used only --prefix flag.
推荐答案
您需要首先正确安装 libbz2.so(通用 libbz2 库),以便 Python 能够构建自己的接口.这通常来自您的 Linux 发行版中的一个包,包名中可能包含libbz2"和dev".
You need libbz2.so (the general purpose libbz2 library) properly installed first, for Python to be able to build its own interface to it. That would typically be from a package in your Linux distro likely to have "libbz2" and "dev" in the package name.
这篇关于Python 的 bz2 模块默认不编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Python 的 bz2 模块默认不编译
基础教程推荐
- 尝试制作WhatsApp机器人 2022-01-01
- 使用生成器和迭代器时 Python 多循环失败 2022-01-01
- 在 Celery 工作人员中捕获 Heroku SIGTERM 以优雅地关 2022-01-01
- pyserial - 可以从线程 a 写入串行端口,是否阻塞从线程 b 读取? 2022-01-01
- 与常规 dict 相比,Python manager.dict() 非常慢 2022-01-01
- 由Python将MP3转换为MIDI(类型错误:无法加载插件:mtg-Melodia:Melodia) 2022-01-01
- 用 Python 编写 Fortran 无格式文件 2022-01-01
- numpy float:比算术运算中内置的慢 10 倍? 2022-01-01
- Discord.py 缺少必需的参数 2022-01-01
- 将 x 轴刻度更改为自定义字符串 2022-01-01
