Python与Java、PyJNIus的安装
为了在Python中使用Java和绑定,我正在安装以下组件:Python与Java、PyJNIus的安装,java,python,pyjnius,Java,Python,Pyjnius,为了在Python中使用Java和绑定,我正在安装以下组件: 我得到了这个错误:它似乎试图将C++文件头编译成JavaHOHE……这看起来很奇怪: Installing collected packages: jnius Running setup.py install for jnius Complete output from command D:\_devs\Python01\WinPython-64-2710\python-2.7.10.amd64\
我得到了这个错误:它似乎试图将C++文件头编译成JavaHOHE……这看起来很奇怪:
Installing collected packages: jnius
Running setup.py install for jnius
Complete output from command D:\_devs\Python01\WinPython-64-2710\python-2.7.10.amd64\python.exe -c "import setuptools, tokenize;__file__='f:\\usertemp\\pip-build-wdmlwj\\jnius\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record f:\usertemp\pip-f_a0kd-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
running build_ext
skipping 'jnius\jnius.c' Cython extension (up-to-date)
building 'jnius' extension
D:\_devs\Python01\WinPython-64-2710\python-2.7.10.amd64\Scripts\gcc.exe -mdll -O -Wall -IE:\_devs\JDK7\include -IE:\_devs\JDK7\include\linux -ID:\_devs\Python01\WinPython-64-2710\python-2.7.10.amd64\include -ID:\_devs\Python01\WinPython-64-2710\python-2.7.10.amd64\PC -c jnius\jnius.c -o build\temp.win-amd64-2.7\Release\jnius\jnius.o
In file included from jnius\jnius.c:256:0:
E:\_devs\JDK7\include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
#include "jni_md.h"
^
compilation terminated.
error: command 'D:\\_devs\\Python01\\WinPython-64-2710\\python-2.7.10.amd64\\Scripts\\gcc.exe' failed with exit status 1
基于这个错误,我认为Python在Windows操作系统中编译Jnius扩展所需的软件包缺失了一个问题,老实说,在Windows中你会发现比Ubuntu更多的错误,我不知道为什么,我从Windows切换到Ubuntu,现在编程更好更简单,但这里有一个解决方法: 在Ubuntu中,我知道执行此操作的命令,但对于windows,请看这里: 在这里:
我能给你的最好建议是,安装最新的稳定的Ubuntu官方软件,没有必要卸载Windows,你可以同时拥有Ubuntu和Windows。老实说,基于这个错误,我认为Python在Windows操作系统中编译Jnius扩展所需的包件缺失是一个问题,在Windows中,你会发现比Ubuntu更多的错误,我不知道为什么,我从Windows切换到Ubuntu,现在,编程更好更简单,但这里有一个解决方法: 在Ubuntu中,我知道执行此操作的命令,但对于windows,请看这里: 在这里:
<> P>最好的建议是,安装最新的稳定Ubuntu官方软件,不需要卸载Windows,你可以同时拥有Ubuntu和Windows 这可能是C,不是C++。也许是一个副本?好,我正在调查这一个:这可能是C,不是C++。可能是一个副本?好,我正在调查这一: