jpype安装问题

利用源码(http://jpype.sourceforge.net/ )安装jpype遇到了找不到python.h的问题

src/native/python/include/jpype_python.h:24:20: 错误:Python.h:没有那个文件或目录
src/native/python/include/jpype_python.h:28:20: 错误:pyport.h:没有那个文件或目录

以及一些有关PyObject的问题

src/native/python/include/pythonenv.h:40: 错误:ISO C++ 不允许声明无类型的‘PyObject’
src/native/python/include/pythonenv.h:40: 错误:expected ‘;’ before ‘*’ token
src/native/python/include/pythonenv.h:43: 错误:ISO C++ 不允许声明无类型的‘PyObject’
src/native/python/include/pythonenv.h:43: 错误:expected ‘;’ before ‘*’ token
src/native/python/include/pythonenv.h:44: 错误:ISO C++ 不允许声明无类型的‘PyObject’
src/native/python/include/pythonenv.h:44: 错误:expected ‘;’ before ‘*’ token
src/native/python/include/pythonenv.h:61: 错误:‘PyObject’未声明
src/native/python/include/pythonenv.h:62: 错误:‘PyObject’未声明
src/native/python/include/pythonenv.h:62: 错误:‘PyObject’未声明
src/native/python/include/pythonenv.h: In static member function ‘static void JPyErr::check()’:
src/native/python/include/pythonenv.h:65: 错误:‘PyObject’在此作用域中尚未声明
src/native/python/include/pythonenv.h:65: 错误:‘__ex’在此作用域中尚未声明
src/native/python/include/pythonenv.h:65: 错误:‘PyErr_Occurred’在此作用域中尚未声明
src/native/python/include/pythonenv.h: At global scope:
src/native/python/include/pythonenv.h:76: 错误:‘PyObject’在此作用域中尚未声明
src/native/python/include/pythonenv.h:76: 错误:‘arg’在此作用域中尚未声明
src/native/python/include/pythonenv.h:76: 错误:expected primary-expression before ‘char’
src/native/python/include/pythonenv.h:76: 错误:expected primary-expression before ‘a1’

查了写资料发现系统缺少python-devel,安装上就好了


此外:安装jpype要把setup.py 中java目录修改成本机的目录。

你可能感兴趣的:(jpype安装问题)