Page 1 of 1

Syntax Error

Posted: Fri Aug 17, 2012 3:50 pm
by E_user
Hi,

when I tryed to install some soft by python install.py, I had that problem:
File "install.py", line 5
print "Raspbmc installer for Linux and Mac OS X"
^
SyntaxError: invalid syntax
How can I fix it?

Thank you...

Re: Syntax Error

Posted: Fri Aug 17, 2012 4:14 pm
by antiloquax
That looks like it's a python 2.x script (no parentheses after print).
Did you run it with Python 2 or 3?
Try

Code: Select all

python2.7 install.py
(assuming it is 2.7 that you have ...)
mark

Re: Syntax Error

Posted: Fri Aug 17, 2012 9:20 pm
by E_user
antiloquax wrote:Try

Code: Select all

python2.7 install.py
Thank you. It was helpfull.

Re: Syntax Error

Posted: Thu Feb 14, 2013 6:17 pm
by CPUnltd
Running into this syntax error issue left and right. (line 6, line 7, line 10, etc) Using python 3.3 on an Arch Linux host install. What am I doing wrong or what do I need to change in the install script to get through this process?

Re: Syntax Error

Posted: Thu Feb 14, 2013 7:17 pm
by -rst-
Install Python 2.x :roll: ...or take a look at the '2to3' tool: "Python 2.6 and 3.0 include a tool called 2to3 that parses Python 2.x code and rewrites it to work in Python 3.0" http://wiki.python.org/moin/Python3000/FAQ