[arch-general] python problems while compiling Android 4.0

Guillaume Brunerie guillaume.brunerie at gmail.com
Sun Jan 29 10:56:56 EST 2012


2012/1/29 Madhurya Kakati <mkakati2805 at gmail.com>:
> Hi,
> I am trying to compile android 4.0 with the help of an article I found online[1]. When I execute a command I get the following error:
>
> $ python2 ~/bin/repo init -u http://git.android-x86.org/manifest -b ics-x86
>  File "/home/papul/android-x86/.repo/repo/main.py", line 149
>      except DownloadError, e:
>                          ^
> SyntaxError: invalid syntax
>
> I think the problem is with python2.

Hi,
I had the same problem with ChromiumOS, the problem is indeed that the
scripts are exec'ing "python" without knowing that it’s python3 (and
of course it occurs even if you run python2 in the first place)
The solution I found is the following :

mkdir /tmp/python2
ln -s /usr/bin/python2 /tmp/python2/python
export PATH=/tmp/python2:$PATH

This will make "python" refer to python3, but only for the current shell.


Guillaume


More information about the arch-general mailing list