SyntaxError:无效的语法来回购AOSP代码中的init [英] SyntaxError: invalid syntax to repo init in the AOSP code
本文介绍了SyntaxError:无效的语法来回购AOSP代码中的init的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已尝试回购源代码Ubuntu编译机的初始化程序,并且它能够成功克隆代码.
I have tried to repo init the source code Ubuntu build machine and it is successfully able to clone the code.
repo init -u git@github.com:xxx/xx_manifest.git -b xxx
repo init -u git@github.com:xxx/xx_manifest.git -b xxx
现在,我正在尝试在VM Ubuntu计算机中回购init的源代码.
Now I am trying repo init the source code in VM Ubuntu machine.
在出现如下所示的错误之间:
In between getting the error like below:
Traceback (most recent call last):
File "/xxx/.repo/repo/main.py", line 56, in <module>
from subcmds.version import Version
File "/xxx/.repo/repo/subcmds/__init__.py", line 38, in <module>
['%s' % name])
File "/xxx/.repo/repo/subcmds/upload.py", line 27, in <module>
from hooks import RepoHook
File "/xxx/.repo/repo/hooks.py", line 472
file=sys.stderr)
^
SyntaxError: invalid syntax
python版本在构建机器和vm机器2.7.17中是相同的.
python version is same in build machine and vm machine 2.7.17.
推荐答案
尝试这些命令
curl https://storage.googleapis.com/git-repo-downloads/repo-1 > ~/bin/repo
chmod a+x ~/bin/repo
python3 ~/bin/repo init -u git@....
这篇关于SyntaxError:无效的语法来回购AOSP代码中的init的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文