正在尝试安装jnius
来自 pip (这是一个要求pip install sikuli
).
这是我尝试安装时遇到的错误:
![enter image description here](https://i.stack.imgur.com/iSgvF.png)
变量定义是否正确?
![enter image description here](https://i.stack.imgur.com/1li7F.png)
有谁明白为什么它一直说找不到JRE_HOME
?
Edit:我的路径变量是:
![enter image description here](https://i.stack.imgur.com/In09r.png)
setup.py 包含:
jdk_home = environ.get('JDK_HOME')
if not jdk_home:
jdk_home = subprocess.Popen('readlink -f /usr/bin/javac | sed "s:bin/javac::"',
shell=True, stdout=subprocess.PIPE).communicate()[0].strip()
if not jdk_home:
raise Exception('Unable to determine JDK_HOME')
jre_home = environ.get('JRE_HOME')
if not jre_home:
jre_home = subprocess.Popen('readlink -f /usr/bin/java | sed "s:bin/java::"',
shell=True, stdout=subprocess.PIPE).communicate()[0].strip()
if not jre_home:
raise Exception('Unable to determine JRE_HOME')
不知怎的,你通过了第一个错误检查Unable to determine JDK_HOME
启动一个新的cmd窗口并重试。
编写一段小代码来测试这些:
import os
print os.environ.get('JDK_HOME')
print os.environ.get('JRE_HOME')
它们不区分大小写,我测试过。
EDIT:检查环境变量:
import json, os
print json.dumps(dict(os.environ), indent = 2)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)