views:

166

answers:

3

Hi all,

I downloaded Python module libgmail from sourceforge and extracted all the files in the archive. The archive had setup.py, so I went to that directory in command prompt and did

setup.py install 

I am getting the following error message

I:\libgmail-0.1.11>setup.py install
Traceback (most recent call last):
  File "I:\libgmail-0.1.11\setup.py", line 7, in ?
    import libgmail
  File "I:\libgmail-0.1.11\libgmail.py", line 36, in ?
    import mechanize as ClientCookie
ImportError: No module named mechanize

This may be trivial, but I am new to python. So plz guide what to do.

please note, I am using python 2.4 and using Windows-XP.

Thank you

MicroKernel

+1  A: 

You need to download and install the module called mechanize. Depending on your operating system (ie. Linux), your package manager probably has something for this, otherwise you will need to google it, and follow it's installation instructions.

Jason Miesionczek
@Jason Miesionczek: Got it installed, it worked thanks :)@ALLOne more note, Now LibGmail is useless. Its not working anymore I guess.. Didn't work for me. imaplib is awesome for this and worked great for me.
Microkernel
+4  A: 

I think this lib depends on this one:

http://wwwsearch.sourceforge.net/mechanize/

Try installing it first.

zefciu
@zefciu, got it installed. Worked. But LibGmail is not working anymore I guess. But imaplib is awesome for gmail now.
Microkernel
A: 

easy_install mechanize

If this doesn't work, you need to fix your PATH environment variable to include path to your python installation directory\scripts. easy_install will save you a lot of time in future.

P.S.: Python 2.4 is 6 years old, you should really consider at least 2.6.

temoto