1
好吧,我跟着指示here,但運行setup.py當我得到一個編譯錯誤無法安裝在Ubuntu 12.04 JPype 64位
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文件 - 導致安裝失敗。
我該如何解決它?我應該在哪裏放這個文件?
注:我的JAVA_HOME正確設置爲/usr/lib/jvm/java-7-oracle/
您是否正確安裝了Python開發包? – 2012-08-14 09:19:17
嗯,我沒有。包裝的名稱是什麼? – Yotam 2012-08-14 09:22:46
可能是'python-dev'或類似的東西。 – 2012-08-14 09:28:06