无法在ubuntu 12.04 64位上安装JPype [英] Cannot install JPype on ubuntu 12.04 64 bit

查看:87
本文介绍了无法在ubuntu 12.04 64位上安装JPype的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我按照此处的说明进行操作,但是我得到了运行setup.py

Well, I followed the instructions here, but I get a compilation error when running setup.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文件-导致安装失败.

So as you can see I get a lot of deprecated warning (that I didn't post) like in the first two lines, but then there's a critical error - the missing Python.h file - that makes the installation fail.

我该如何解决?我应该把这个文件放在哪里?

How do I go about fixing it? Where should I put this file?

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

Note: my JAVA_HOME is set correctly to /usr/lib/jvm/java-7-oracle/

推荐答案

命令:

sudo apt-get install python-jpype

为我工作.

这篇关于无法在ubuntu 12.04 64位上安装JPype的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆