Python build fails. No such file: Python.h

Hi folks - as a temporary fix, could you try appending CPATH=/usr/include/python3.7m to your pip install cmd; for example CPATH=/usr/include/python3.7m pip install -r requirements.txt in the Render build cmd.

I’ve replicated this build error locally and forcing the CPATH fixed the install. The new env image deploy was for an unrelated change. Our native environments have included the python3-dev package and header files (documented here Native Environments | Render · Cloud Hosting for Developers ) so I will continue to investigate why they aren’t getting used correctly.

1 Like