Opened 4 years ago
Last modified 3 years ago
#6223 assigned task
Python.h not found
Reported by: | Owned by: | arunkumar palanisamy | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | OMPython | Version: | 1.16.0 |
Keywords: | python.h, python, interoperability | Cc: |
Description
I try this example to include a Python function in OpenModelica:
https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/interop_c_python.html
However I get following error :
make -j2 -f CallExternalPython.makefile
clang -Os -fPIC -mfpmath=sse -fno-dollars-in-identifiers -I"/usr/bin/../include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=CallExternalPython -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o CallExternalPython.o CallExternalPython.c
clang -Os -fPIC -mfpmath=sse -fno-dollars-in-identifiers -I"/usr/bin/../include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=CallExternalPython -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o CallExternalPython_functions.o CallExternalPython_functions.c
In file included from CallExternalPython_functions.c:7:
./CallExternalPython_includes.h:5:10: fatal error: 'Python.h' file not found
#include <Python.h>
~
1 error generated.
<builtin>: recipe for target 'CallExternalPython_functions.o' failed
make: * [CallExternalPython_functions.o] Error 1
make: * Waiting for unfinished jobs....
Compilation process failed. Exited with code 2.
I checked that gcc is installed. I have the package python3-dev, so that Python.h exists.
I copied a path to Python.h in the ModelicaPath to be sure it's not a path issue.
Any idea how I could solve this ?
Change History (3)
comment:1 by , 4 years ago
Component: | Backend → OMPython |
---|---|
Milestone: | NeedsInput → 1.17.0 |
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.