Skip to content

Compile Error Python >= 3.10

Python devel header removal in Python >= 3.10

Error: PythonShell.cpp:25:10: fatal error: Python-ast.h: No such file or directory

Reason: (Changelog Python 3.10, https://docs.python.org/3/whatsnew/3.10.html)

Remove ast.h, asdl.h, and Python-ast.h header files. These functions were undocumented and excluded from the limited C API. Most names defined by these header files were not prefixed by Py and so could create names conflicts. For example, Python-ast.h defined a Yield macro which was conflict with the Yield name used by the Windows <winbase.h> header. Use the Python ast module instead. (Contributed by Victor Stinner in bpo-43244.)