在 Ubuntu 18.04 上编译 Python 3.7.4 时测试失败

Failed tests when compiling Python 3.7.4 on Ubuntu 18.04

由于我的软件包存储库中没有最新的 python,我尝试从源代码构建和安装 Python 3.7.4。我想构建优化,所以我 运行 以下内容:

./configure --enable-optimizations
make
make test

test_readline 失败并显示以下错误消息:

AttributeError: module 'readline' has no attribute '_READLINE_VERSION'

我不知道如何解决这个问题。请赐教。

原来是 readline 的问题。我通过卸载 readline 并安装 gnureadline 解决了这个问题,如前所述 .