解析新命令抛出语法错误

时间:2015-01-03 18:40:39

标签: python linux parse-platform

我第一次尝试解析并且使用curl来安装解析脚本但是每当我尝试命令时我都会收到语法错误。

Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/bin/parse/__main__.py", line 2, in <module>
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2222, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 2164, in _find_spec
  File "<frozen importlib._bootstrap>", line 1940, in find_spec
  File "<frozen importlib._bootstrap>", line 1916, in _get_spec
  File "<frozen importlib._bootstrap>", line 1897, in _legacy_get_spec
  File "<frozen importlib._bootstrap>", line 863, in spec_from_loader
  File "<frozen importlib._bootstrap>", line 904, in spec_from_file_location
  File "/usr/local/bin/parse/main.py", line 481
    os.chmod(executor, 0755)
                          ^
SyntaxError: invalid token

我想我可以通过传递八进制而不是十进制来修复错误但我无法编辑代码。我唯一的选择是以某种方式让我的python2在我的系统中执行而不是python 3.4

我该怎么做?

不,我无法删除python 3.4,它有很多依赖。

0 个答案:

没有答案