repo issue "def print(self, *args, **kwargs):"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

repo issue "def print(self, *args, **kwargs):"

repo issue "def print(self, *args, **kwargs):"

Symptoms

 

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

 

Workaround (1)

 

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.

 

 

Workaround (2)

 

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

Alejandro_Salas_0-1699913847562.png

 

EDITED FILE

Alejandro_Salas_1-1699913905532.png

 

After to do this change, repo will works fine again.

 

 

I hope this can helps to you!

 

Best regards.

100% helpful (5/5)
Version history
Last update:
‎02-01-2024 09:50 AM
Updated by: