[arch-general] python problems while compiling Android 4.0
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. [1] http://hyper-choi.blogspot.com/2012/01/andorid-x86-ics-on-qemu.html -- Madhurya Kakati () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
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. I remember doing this, it was a problem with python. I think it wanted
On 29 January 2012 12:12, Madhurya Kakati <mkakati2805@gmail.com> wrote: python2 but it found python3, something like that. I couldn't really understand the script, it was python inside bash so instead of spending years trying to fix it I moved /usr/bin/python to /usr/bin/python.bak and copied /usr/bin/python2 to /usr/bin/python. This is a (really) -bad- solution, if you try it remember to restore the files or something will surely go wrong.
[1] http://hyper-choi.blogspot.com/2012/01/andorid-x86-ics-on-qemu.html -- Madhurya Kakati
() ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
-- Thanasis Georgiou
On 01/29/12 at 12:28pm, Thanasis Georgiou wrote:
I remember doing this, it was a problem with python. I think it wanted python2 but it found python3, something like that. I couldn't really understand the script, it was python inside bash so instead of spending years trying to fix it I moved /usr/bin/python to /usr/bin/python.bak and copied /usr/bin/python2 to /usr/bin/python. This is a (really) -bad- solution, if you try it remember to restore the files or something will surely go wrong. -- Thanasis Georgiou
Look at the command carefully. I used python2. That means it is running python 2.7.2. Right now I am downloading python2.6 from AUR. Hope that helps. -- Madhurya Kakati () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
On 29 January 2012 12:33, Madhurya Kakati <mkakati2805@gmail.com> wrote:
On 01/29/12 at 12:28pm, Thanasis Georgiou wrote:
I remember doing this, it was a problem with python. I think it wanted python2 but it found python3, something like that. I couldn't really understand the script, it was python inside bash so instead of spending years trying to fix it I moved /usr/bin/python to /usr/bin/python.bak and copied /usr/bin/python2 to /usr/bin/python. This is a (really) -bad- solution, if you try it remember to restore the files or something will surely go wrong.
Look at the command carefully. I used python2. That means it is running python 2.7.2. Right now I am downloading python2.6 from AUR. Hope that helps. -- Madhurya Kakati
Yes but check, for example, line 23 in the repo script. It clearly runs 'python' and not 'python2' or 'python3' and since 'python' stands for 'python3' in Archlinux so I think that's the problem. -- Thanasis Georgiou
Look at the command carefully. I used python2. That means it is running
On Jan 29, 2012 4:13 PM, "Thanasis Georgiou" <sakisds.s@gmail.com> wrote: python
2.7.2. Right now I am downloading python2.6 from AUR. Hope that helps. -- Madhurya Kakati
Yes but check, for example, line 23 in the repo script. It clearly runs 'python' and not 'python2' or 'python3' and since 'python' stands for 'python3' in Archlinux so I think that's the problem. -- Thanasis Georgiou
Hmm.. Didn't read the repo script properly. Will try doing that. Thanks. :-) P.S: Why isn't python 3 backwards compatible?
2012/1/29 Madhurya Kakati <mkakati2805@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
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. If it is of any interest I had a similar problem when compiling alsalib. I just uninstalled python3. Done the compiling and then reinstalled python3. It worked for me. Just another option... maybe.
Clive -- Infinity: A concept for those who cannot comprehend the big picture. () Arch Linux - For movers and shakers. ()
On Sun, Jan 29, 2012 at 04:33:54PM +0000, Clive Cooper wrote:
This will make "python" refer to python3, but only for the current shell. If it is of any interest I had a similar problem when compiling alsalib. I just uninstalled python3. Done the compiling and then reinstalled python3. It worked for me. Just another option... maybe.
heya Another way which usually works for me is recursively grepping and sed-replace any occurrence of the "python" calls in the pkgbuild, which works fine, as python is an interpreted language. 0.02CHF, maybe I'm not helping much. cheers! mar77i
participants (5)
-
Clive Cooper
-
Guillaume Brunerie
-
Madhurya Kakati
-
Martti Kühne
-
Thanasis Georgiou