How to install JPype on OS X Lion to use with Neo4j?

后端 未结 10 1537
梦谈多话
梦谈多话 2020-12-06 12:51

I am trying to use Neo4j for a project, and want to interface with it through Python since I\'m a newbie to programming and don\'t know any Java. I\'m following the installa

10条回答
  •  天涯浪人
    2020-12-06 13:36

    On my Lion, the "include" directory in the JDK was gone, so JPype couldn't find jni.h.

    I updated setup.py in two places, one to set where to find jar libraries:

    def setupMacOSX(self):
        self.javaHome = '/System/Library/Frameworks/JavaVM.framework'
        self.jdkInclude = ""
        self.libraries = ["dl"]
        self.libraryDir = [self.javaHome+"/Home/lib"]
        self.macros = [('MACOSX',1)]
    

    And one to set where to find jni.h:

    def setupInclusion(self):
        self.includeDirs = [
            self.javaHome+"/Headers",
            
    

提交回复
热议问题