Mechanize not recognized by py2exe
gagsl-py2 at yahoo.com.ar
Mon Jul 20 09:50:15 CEST 2009
En Fri, 17 Jul 2009 15:51:11 -0300, Stephen M. Olds <smolds at comcast.net>
> I have a Python script getData.py that uses Mechanize, and runs fine
> under the
> interpreter. It was installed using easy_install - and the install
> seemed to
> indicate it was completed.
> The problem is, when I try to compile it using py2exe while in the
> folder of the
> script, and using the run line command:
> python getData.py py2exe
> I get the warning: "Import error: No Module named mechanize"...
> I checked the environmental path and find the following:
> Files (x86)\Python;C:\Python25\Lib\site-packages;C:\Program
> Files (x86)\Common Files\Adobe\AGL
The system PATH is irrelevant here - it's only used by Windows to locate
the Python executable. I don't see a reason to list
You're mostly interested in sys.path instead (that is, the 'path'
attribute in the 'sys' Python module)
> I did a search for mechanize and find an egg file in
> named mechanize-0.1.7b-py2.5.
> Not really understanding the "egg" thing, what do I have here that needs
> to be
I'm not an egg expert either, and I try to avoid them as a plague. But I
*think* you can delete the .egg and re-install it using easy_install with
the -Z option.
More information about the Python-list