The following error occurs when compiling jpype Python setup. py build:
4-2.4/src/native/Python/jpype_javaarray.oin file encoded from src/native/Python/jpype_javaarray.cpp: 18: src/native/Python/include/jpype_python.h: 24: 20: Error: python. h: No such file or directorysrc/native/Python/include/jpype_python.h: 28: 20: Error: pyport. h: No such file or directoryin file encoded ded from src/native/Python/include/jpype_python.h: 109, from src/native/Python/jpype_javaarray.cpp: 18: src/native/Python/include/py_monitor.h: 20: 20: Error: object. h: No such file or directorysrc/native/Python/include/pythonenv. h: 40: Error: iso c ++ forbids declaration of 'pyobject' with no typesrc/native/Python/include/pythonenv. h: 40: Error: Expected '; 'before' * 'tokensrc/native/Python/include/pythonenv. h: 43: Error: iso c ++ forbids declaration of 'pyobject' with no typesrc/native/Python/include/pythonenv. h: 43: Error: Expected '; 'before' * 'tokensrc/native/Python/include/pythonenv. h: 44: Error: iso c ++ forbids declaration of 'pyobject' with no typesrc/native/Python/include/pythonenv. h: 44: Error: Expected '; 'before' * 'tokensrc/native/Python/include/pythonenv. h: 61: Error: 'pyobject' has not been declaredsrc/native/Python/include/pythonenv. h: 62: Error: 'pyobject' has not been declaredsrc/native/Python/include/pythonenv. h: 62: Error: 'pyobject' has not been declaredsrc/native/Python/include/pythonenv. h: In static member function 'static void jpyerr: Check () ': src/native/Python/include/pythonenv. h: 65: Error: 'pyobject' was not declared in this scopesrc/native/Python/include/pythonenv. h: 65: Error: '_ Ex' was not declared in this scopesrc/native/Python/include/pythonenv. h: 65: Error: 'pyerr _ occurred' was not declared in this scopesrc/native/Python/include/pythonenv. h: at global scope:
It took only half a day to find the reason. It turns out that python is not installed.
Yum install python-devel-2.4.3-44.el5
Done.
Note: When compiling jpype, you also need to set the java_home environment variable.