1.问题
#sudo repo init -u git://<manifest tag> -b release -m <<manifest xml> 报如下错:
File "/work/1_SourceCode/1.7_Sourcecode_R_building/.repo/repo/main.py", line 79
file=sys.stderr)
^
SyntaxError: invalid syntax
打开上面main.py,查看line 79代码:
76 if sys.version_info.major < 3:
77 print('repo: error: Python 2 is no longer supported; '
78 'Please upgrade to Python {}.{}+.'.format(*MIN_PYTHON_VERSION_SOFT),
79 file=sys.stderr)
80 sys.exit(1)
提示python版本低于3,当前版本:
#python -V
Python 2.7.12
所以,需要升级到版本3以上.
2.下载源码
官网:Python Source Releases | Python.org
2.1 Source code