I’m trying to build an Android kernel with make command. The script uses python2 to log errors in the print >> sys.stderr, line fashion. So instead of actual error output I get errors about incorrect python syntax.
I had an idea to delete python3, but I read that it could be harmful to the system as it comes bundled and many things might depend on it. Tried adding alias python=python2 at the end of the .bashrc file, rebooted the terminal, tested it with the line:
echo `python -c "print 'test'"` # prints 'test' correctly
But when I make, I still get the same errors, it somehow manages to use python3 anyways.
Where is my mistake?
>Solution :
You did not show your Makefile. The easiest thing is to define the absolute path of python on your system. You can get that by using the which command. Then, change python in Makefile to the absolute path that you found out using which python2.