2

When compiling Python 3.4.3 from source on CentOS 7 the README indicates to run

./configure
make
make test
sudo make install

On the second step, make, I see

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.

But nothing in the source code for setup.py indicates what to do? It seems like I already have the requisite package?

$ sudo yum install readline
...
Package readline-6.2-10.el7.x86_64 already installed and latest version
Nothing to do

How do I get the readline module for python 3?

turbulencetoo
  • 3,447
  • 1
  • 27
  • 50

1 Answers1

4

Install the readline-devel package

$ 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!

Then re-run 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

Now both readline and _curses modules are installed, and absent from the list of missing modules.

I got the hint from an answer on this question: yum showing readline installed but readline command not working

This pattern proved to work well for the other missing packages. ssl required the openssl-devel package, and zlib required zlib-devel.

turbulencetoo
  • 3,447
  • 1
  • 27
  • 50