xeus-cling
xeus-cling copied to clipboard
fatal error: 'Python.h' file not found
Using Jupyter+Cling and trying to build simple python extension:
In [1]: #include <Python.h>
input_line_8:1:10: fatal error: 'Python.h' file not found
#include <Python.h>
^~~~~~~~~~
Workaround is to add the following lines to .bashrc:
export C_INCLUDE_PATH="~/miniconda3/include/python3.7m/"
export CPLUS_INCLUDE_PATH="~/miniconda3/include/python3.7m/"
However, I feel that this should work out-of-the-box without workaround.
This issue is created from https://github.com/ContinuumIO/anaconda-issues/issues/11430 since it's clearly not problem of Anaconda/Miniconda.
Another solution:
#pragma cling add_include_path("$CONDA_PREFIX/include/python3.7m/")
#include <Python.h>
