无法在ubuntu 12.04 64 bi上安装JPype

2024-06-09 00:09:38 发布

您现在位置:Python中文网/ 问答频道 /正文

好吧,我遵循了here的说明,但是在运行时遇到了一个编译错误设置.py在

src/native/common/jp_voidtype.cpp: In member function ‘virtual void JPVoidType::setArrayValues(jarray, HostRef*)’:
src/native/common/jp_voidtype.cpp:105:2: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
In file included from src/native/python/jpype_python.cpp:18:0:
src/native/python/include/jpype_python.h:24:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

如前两行所示,我收到了很多不推荐使用的警告(我没有发布),但是有一个严重的错误-丢失的Python.h文件-导致安装失败。在

我该怎么修理它?我应该把这个文件放在哪里?在

注意:我的javahome被正确地设置为/usr/lib/jvm/java-7-oracle/


Tags: srcforislinepluscppcommandoption