Question

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

Was it helpful?

Solution

I think this lib depends on this one:

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

Try installing it first.

OTHER TIPS

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top