You are not logged in.
Pages: 1
Hi all ![]()
I'm trying to execute this program, but I get this error:
File "./relational_gui.py", line 31
print "Relational %s" % version
^
SyntaxError: invalid syntax
How can I solve it?
Last edited by Aegidius (2011-12-22 03:06:21)
Offline
Take a look at line 1.
I'll wager it looks like:
#! /usr/bin/pythonThat print statement uses Python 2 format. Arch defaults to Python 3.
Change line 1 to read:
#! /usr/bin/python2It might also say:
#!/usr/bin/env pythonIn that case, change it to
#!/usr/bin/env python2Edit: fixed errors and added different case
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Try changing
#!/usr/bin/env pythonto
#!/usr/bin/env python2Edit: my ancestors must have been turtles...
Last edited by bohoomil (2011-12-22 03:00:51)
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
Pages: 1