Installing jpype in Mountain Lion

梦想的初衷 提交于 2019-12-03 14:24:17

This is on a system running OSX 10.8.5.

I modified the setup.py for JPype-0.5.4.2 and added an element to the end of the self.includeDirs list which is created in the function setupInclusion. This function is declared at line 61 for this particular version of JPype.

     def setupInclusion(self):
          self.includeDirs = [
              self.javaHome+"/include", 
              self.javaHome+"/include/"+self.jdkInclude,
              "src/native/common/include",
              "src/native/python/include",

              #I added this line below. The folder contains a jni.h
              "/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/"
          ]

Finally I ran pip install ~/Path/To/JPype-folder/ and the installation was successful.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!