JPype is a perquisite for neo4j-embedded. To install JPype, you should have following packages installed prior to that:

  • g++
  • python26-devel
  • gcc
  • jdk

After installing everything, I tried to install JPype, but stuck in this error

src/native/common/include/jpype.h:45:17: fatal error: jni.h: No such file or directory

I looked and found out that the compile process is not able to find “jni.h”, which is installed by JDK package. That means the variable “JAVA_HOME” is not set correctly.
Simply search you machine and find where “jni.h” ┬áresides, and figure out the correct JAVA_HOME. Now open the file “”, which will be inside JPype package and update like this:
def setupLinux(self):
self.javaHome = os.getenv("JAVA_HOME")
if self.javaHome is None :
      #self.javaHome = '/usr/lib/jvm/java-1.5.0-sun-' # was this
       self.javaHome = '/usr/lib/jvm/java-7-openjdk-amd64' # to this
self.jdkInclude = "linux"
self.libraries = ["dl"]
self.libraryDir = [self.javaHome+"/lib"]

Now try to install the package and hopefully it should work unless you have something else missing on your machine.

If you enjoyed this post, make sure you subscribe to my RSS feed!!!!

No related content found.