python - 语法错误 : invalid syntax to repo init in the AOSP code

标签 python github virtual-machine android-source repo

我曾尝试 repo init 源代码 Ubuntu 构建机器,它能够成功克隆代码。
repo 初始化 -u git@github.com:xxx/xx_manifest.git -b xxx
现在我正在尝试 repo init VM Ubuntu 机器中的源代码。
在得到如下错误之间:

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 中是相同的。

最佳答案

试试这些命令

curl https://storage.googleapis.com/git-repo-downloads/repo-1 > ~/bin/repo
chmod a+x ~/bin/repo
python3 ~/bin/repo init -u git@....

关于python - 语法错误 : invalid syntax to repo init in the AOSP code,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65193998/

相关文章:

Git (1.7.10) 每次都询问我的用户名和密码

mysql - 从转储加载 mysql 数据库需要很长时间

windows - ISE 设计套件 14.7 : ISE® Spartan®-6 Virtual Machine (VM) for Windows 10

python - 考虑顺序如何检查列表(字符串)是否包含另一个列表(字符串)

python - 在 pandas 列中展开词袋(python)

python - 字典神奇地转换为在 nosetests 中设置

使用 Emacs 进行 Python 开发?

git - 如何从标签中删除 Git 提交?

java - 尝试使用 github 操作 (maven) 部署到 github 包时出现错误代码 400

linux - 如何使用终端而不是应用程序在VM中扩展磁盘?