Difference between revisions of "Repo issue "def print(self, *args, **kwargs):""

From KoanSoftware Wiki
Jump to: navigation, search
(Created page with "== 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 im...")
 
(No difference)

Latest revision as of 10:33, 6 December 2023

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-kirkstone -m imx-5.15.52-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


Workaround (2)

The workaround is very simple, only we need modify the repo file

$ vi ~/bin/repo

and we will change the python interpreter in the first line (from python to phyton3):

Change this line

#!/usr/bin/env python

to this line

#!/usr/bin/env python3

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



Credits: NXP Community