Trying to initialize a repo, for example:
$repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-mickledore -m imx-6.1.36-2.1.0.xml
we have the below log:
File "/home/username/bin/repo", line 51
def print(self, *args, **kwargs):
^
SyntaxError: invalid syntax
The first workaround consist in change the python alternatives (caused when you have installed two or more python versions).
NOTE: in my case, the python version that i want to change as first priority is python3.8
$sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1
Then we run:
$sudo update-alternatives --config python
To verify if your python priority was changed successfully try:
$python --version
You should see the version configured as priority number 1.
The workaround is very simple, only we need modify the repo file
$ nano ~/bin/repo
and we will change the python interpreter in the first line (from python to python3):
ORIGINAL FILE
EDITED FILE
After to do this change, repo will works fine again.
I hope this can helps to you!
Best regards.