gpt4 book ai didi

python - 在 CentOS7 上从源代码编译 Python3.4 时无法构建可选模块 readline 和 _curses

转载 作者:行者123 更新时间:2023-12-04 19:30:58 24 4
gpt4 key购买 nike

在 CentOS 7 上从源代码编译 Python 3.4.3 时,README 指示运行

./configure
make
make test
sudo make install

第二步, make , 我懂了
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _gdbm _lzma
_sqlite3 _ssl _tkinter
readline zlib
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

但是 setup.py 的源代码中没有任何内容表明要做什么?好像我已经有了必要的包?
$ sudo yum install readline
...
Package readline-6.2-10.el7.x86_64 already installed and latest version
Nothing to do

我如何获得 readline python 3的模块?

最佳答案

安装 readline-devel包裹

$ sudo yum install readline-devel
[...]
Installed:
readline-devel.x86_64 0:6.2-10.el7

Dependency Installed:
ncurses-devel.x86_64 0:5.9-14.20130511.el7_4

Dependency Updated:
ncurses.x86_64 0:5.9-14.20130511.el7_4 [...]

Complete!

然后重新运行 make
$ make
[...]
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2 _dbm _gdbm
_lzma _sqlite3 _ssl
_tkinter zlib

现在两个 readline_curses模块已安装,但缺少模块列表中不存在。

我从这个问题的答案中得到了提示: yum showing readline installed but readline command not working

事实证明,这种模式适用于其他缺失的包。 ssl需要 openssl-devel包和 zlib必填 zlib-devel .

关于python - 在 CentOS7 上从源代码编译 Python3.4 时无法构建可选模块 readline 和 _curses,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49763362/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com