Gabriel Genellina-7 wrote: > > En Fri, 17 Jul 2009 15:51:11 -0300, Stephen M. Olds <smo...@comcast.net> > escribió: > >> 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: >> %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program >> 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 > C:\Python25\Lib\site-packages here. > 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 >> C:\Python25\Lib\site-packages >> named mechanize-0.1.7b-py2.5. >> >> Not really understanding the "egg" thing, what do I have here that needs >> to be >> done? > > 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. > > -- > Gabriel Genellina > > -- > http://mail.python.org/mailman/listinfo/python-list > >
Gabriel, that was the kick in the pants I needed! Thanks - after over a week searching through the same 15 web pages these old eyes simply blurred over and I missed that one...I had tried the -a option, but that's what got me the eggs... So, thanks for the help...it's too late to name my first born after you, but I did have a cat named Gabriel - she was a great cat! Stephen -- View this message in context: http://www.nabble.com/Mechanize-not-recognized-by-py2exe-tp24540012p24581545.html Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/python-list