我正在尝试在Os X Yosemite上为ol3设置开发环境。遵循these指令,我成功通过了“make test”并安装了必要的Python模块。下一步“make check”失败。这是输出:
Running gjslint...
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/bin/gjslint", line 9, in <module>
load_entry_point('closure-linter==2.3.13', 'console_scripts', 'gjslint')()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 353, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 2302, in load_entry_point
return ep.load()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 2029, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/closure_linter/gjslint.py", line 168
print '%s: %d' % (path, len(path_errors))
^
SyntaxError: invalid syntax
make: *** [build/timestamps/gjslint-timestamp] Error 1
编辑:正如答案中所指出的那样,错误是由于我使用了错误的python版本。所需的版本是2而不是3.我现在检查了“python -V”,它显示我的python版本是2.7.10。为什么“make check”仍然使用3.4版本?