You are not logged in.

#1 2011-12-22 02:54:13

Aegidius
Member
From: Italy
Registered: 2011-06-29
Posts: 288
Website

[Solved] Relational

Hi all smile

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

#2 2011-12-22 02:58:15

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,612

Re: [Solved] Relational

Take a look at line 1.

I'll wager it looks like:

#! /usr/bin/python

That print statement uses Python 2 format.  Arch defaults to Python 3.

Change line 1 to read:

#! /usr/bin/python2

It might also say:

#!/usr/bin/env python

In that case, change it to

#!/usr/bin/env python2

Edit: 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

#3 2011-12-22 02:59:57

Aegidius
Member
From: Italy
Registered: 2011-06-29
Posts: 288
Website

Re: [Solved] Relational

Thank you smile

Offline

#4 2011-12-22 02:59:58

bohoomil
Banned
Registered: 2010-09-04
Posts: 2,377
Website

Re: [Solved] Relational

Try changing

#!/usr/bin/env python

to

#!/usr/bin/env python2

Edit: 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

#5 2011-12-22 03:00:37

Aegidius
Member
From: Italy
Registered: 2011-06-29
Posts: 288
Website

Re: [Solved] Relational

Thank you too tongue

Offline

Board footer

Powered by FluxBB