views:

82

answers:

3

Hi All,

i'm a newbie in python , and trying to install libgmail .. this is what i get :

C:\libgmail-0.1.11>setup.py
Traceback (most recent call last):
  File "C:\libgmail-0.1.11\setup.py", line 7, in <module>
    import libgmail
  File "C:\libgmail-0.1.11\libgmail.py", line 96
    exec data in {'__builtins__': None}, {'D': lambda x: result.append(x)}
            ^
SyntaxError: invalid syntax

i think that the libgmail is a bit older then my python version , but dont know how to solve it, please help :-)

thanks in advance Amitos80

A: 

Which version of Python are you using? It's possible it's 3.x which doesn't understand exec as a statement (in Python 3, exec, like print became a function and is no longer a special keyword/statement).

The solution is to either find a port of libgmail to Python 3, or install Python 2.7 for yourself instead.

Eli Bendersky
A: 

What version of libgmail are you installing? I succesfully installed mechanize( on which libgmail was depending) and libgmail by easy_install minute ago.

Odomontois
A: 

thanks all, i installed python 2.7 , then mechanize and then libgmail successfully :-)