$ repo init -u url
warning: Python 3 support is currently experimental. YMMV.
Please use Python 2.6 - 2.7 instead.
Traceback (most recent call last):
File "/usr/bin/repo", line 886, in <module>
main(sys.argv[1:])
File "/usr/bin/repo", line 854, in main
_Init(args, gitc_init=(cmd == 'gitc-init'))
File "/usr/bin/repo", line 340, in _Init
_CheckGitVersion()
File "/usr/bin/repo", line 394, in _CheckGitVersion
ver_act = ParseGitVersion(ver_str)
File "/usr/bin/repo", line 364, in ParseGitVersion
if not ver_str.startswith('git version '):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
修改repo文件就可以:
$ sudo vi /usr/bin/repo
修改
#!/usr/bin/python
为#!/usr/bin/python2
即可。
网友评论