Question

Well, I followed the instructions here, but I get a compilation error when running setup.py

src/native/common/jp_voidtype.cpp: In member function ‘virtual void JPVoidType::setArrayValues(jarray, HostRef*)’:
src/native/common/jp_voidtype.cpp:105:2: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
In file included from src/native/python/jpype_python.cpp:18:0:
src/native/python/include/jpype_python.h:24:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

So as you can see I get a lot of deprecated warning (that I didn't post) like in the first two lines, but then there's a critical error - the missing Python.h file - that makes the installation fail.

How do I go about fixing it? Where should I put this file?

Note: my JAVA_HOME is set correctly to /usr/lib/jvm/java-7-oracle/

Était-ce utile?

La solution

The command:

sudo apt-get install python-jpype

Worked for me.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top