JPype is a requirement of neo4j-embedded and is not available through PyPI. When building from source, I ran into the following compile error:
src/native/common/include/jpype.h:45:17: fatal error: jni.h: No such file or directory
First, make sure that you have the JDK installed (sudo apt-get install openjdk-7-jdk
if apt-get
is available on your machine) and find where jni.h lives (was /usr/lib/jvm/java-7-openjdk-amd64
for me)
Next, make the following change to setup.py
in your JPype directory:
def setupLinux(self):
self.javaHome = os.getenv("JAVA_HOME")
if self.javaHome is None :
#self.javaHome = '/usr/lib/jvm/java-1.5.0-sun-1.5.0.08' # 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, your build should complete as expected (barring any other issues local to your own machine).