Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JPype : fatal error: 'jni.h' file not found

Hello I am trying to install JPype-0.5.4.2 using:

python setup.py install

And I get the following error:

In file included from src/native/common/jp_array.cpp:17:
src/native/common/include/jpype.h:45:10: fatal error: 'jni.h' file not found
#include <jni.h>
         ^
1 error generated.
error: command 'cc' failed with exit status 1

Any idea how to fix this? Thanks

like image 427
user1855165 Avatar asked Dec 05 '25 10:12

user1855165


1 Answers

I am on MacOSX 10.8.5 and this answer worked for me. After editing def setupInclusion(self):, I ran $ python setup.py install and was successful.

However, if you are on Linux instead, then check to see if you installed the JRE instead of the JDK. See this answer for more details.

like image 188
Climbs_lika_Spyder Avatar answered Dec 08 '25 02:12

Climbs_lika_Spyder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!