错误:命令出错,退出状态为1:python setup.py egg_info检查日志以获取完整的命令输出.-在尝试安装



我一直试图通过pip命令pip install pyjniuspip install git+git://github.com/kivy/pyjnius.git安装pyjnius,但似乎都返回了以下错误代码。

Collecting git+git://github.com/kivy/pyjnius.git
Cloning git://github.com/kivy/pyjnius.git to c:temppip-req-build-7d_4quh2
ERROR: Command errored out with exit status 1:
command: 'c:usersuserpycharmprojectskivy_projectvenvscriptspython
.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Temp\pip-
req-build-7d_4quh2\setup.py'"'"'; __file__='"'"'C:\Temp\pip-req-build-7d_4
quh2\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=
f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, _
_file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:Temppip-pip-egg-info-6mu1
ulvw'
cwd: C:Temppip-req-build-7d_4quh2
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:Temppip-req-build-7d_4quh2setup.py", line 95, in <module>
compile_native_invocation_handler(*get_possible_homes(PLATFORM))
File "jniusenv.py", line 172, in get_possible_homes
get_jdk_home(platform),
File "jniusenv.py", line 142, in get_jdk_home
raise Exception('Unable to determine JDK_HOME')
Exception: Unable to determine JDK_HOME
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check
the logs for full command output.

请任何人给我一个解决方案,因为我对这件事有点陌生。

错误消息显示失败的原因:

Exception: Unable to determine JDK_HOME

确保您安装了JDK(Java开发工具包(。如果JDK已安装,但仍然无法工作,请尝试将JDK_HOME环境变量设置为指向正确的位置。

以下是抛出错误消息的位置,供参考:https://github.com/kivy/pyjnius/blob/7dd6c8e679302526d6e86bdddeca343a3f0b54c7/jnius/env.py#L118-L144

最新更新