I am trying to compile the API for Python in MacOS.
After issuing 'make' in APIs/python, I got this error:
g++ -dynamiclib -o _freeling.so freeling_pythonAPI.cxx -lpython3.5 -lfreeling -I/opt/local/include -L/opt/local/lib -I/Library/frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages -fPIC
freeling_pythonAPI.cxx:171:11: fatal error: 'Python.h' file not found
# include < Python.h >
1 error generated.
make: *** [_freeling.so] Error 1
I have doubts for assigning correctly the variable PYTHONDIR. I am working with PyCharm, and with the version python 3.5.
The previous value for the PYTHONDIR variable corresponds to the directory where the packages are installed.
I have also tried with the directory where the interpreter is hosted:
But I got the same problem.
I have seen in this post (http://nlp.lsi.upc.edu/freeling-old/index.php?option=com_simpleboard&It…) the suggestion to assign the value usr/include/python3.1 to PYTHONDIR. However, the only directory I had with a similar name is /usr/include/python2.7. In this directory there is a file named 'Python.h'.
I do not know if I should assign /usr/include/python2.7 for PYTHONDIR, as the interpreter I work with is version 3.5.
Any help will be very much appreciated.