How can prepare the modules when compiling python3.11?

Compile python-3.11:

curl -O
tar -xf Python-3.11.0rc2.tar.xz
cd Python-3.11.0rc2/
./configure --enable-optimizations
make -j 4

It encounter the following error:

The necessary bits to build these optional modules were not found:
_bz2                  _curses               _curses_panel      
_dbm                  _gdbm                 _hashlib           
_lzma                 _ssl                  _tkinter           
_uuid                 readline              zlib

How can fix it?

This isn’t an error, but merely an informational warning letting you know that certain optional modules that require specific development dependencies to be present on your system were not able to be built, as those dependencies were not found. If you might need those optional modules and want to compile them, you should follow the steps given on the first page of the Python devguide; namely, on Linux, use your distro’s package manager to automatically retrieve and install the build dependencies of the python3 package. See the linked section for a detailed, step by step guide on that.

1 Like