在Mac中安装jpype

来源:互联网 发布:国密算法 .net 编辑:程序博客网 时间:2024/06/06 20:33

在Mac中安装jpype, 默认使用python setup install不成功,有几个步骤:

1. 安装XCode

2. 安装XCode命令行工具,使系统能找到clang

3. 更改setup.py使系统能够找到header文件,


参考一下链接:


http://stackoverflow.com/questions/8525193/how-to-install-jpype-on-os-x-lion-to-use-with-neo4j 


def setupInclusion(self)
        self.includeDirs = [
            self.javaHome+"/include",
            self.javaHome+"/include/"+self.jdkInclude,
            "src/native/common/include",
            "src/native/python/include",         "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers"
        ]


"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers"

原创粉丝点击