Non Egg Install of Mechanize – Py2exe fails the workaround
I racked my brain to install Mechanize in Win7 without much effort. I tried the easy_install–allways-unzip method. easy_install -Z method. Added a .pth file to the site-packages directory. The above combination has been added.
Py2exe does not handle egg files well. If you have this job, please reply.
Thanks – Brad
Some of the links I clicked on were:
Mechanize not being installed by easy_install?
How to install mechanize for Python 2.7?
If you haven’t read it yet, there’s a section about py2exe website about dealing with eggs. py2exe can be tricky without handling
egg installation packages. I’ll do one of the following:
the mechanizesource package, unzip and edit it
setup.pyto change the
False. Then install mechanize:: from the command line
python setup.py install
Install using pip:
pip install mechanize
Of course you have to install pip first (
easy_install pip). pip installs flat packages by default. (FYI – if you end up using
pipon Windows, you need to be aware that it can’t handle python packages that need to be compiled.) Mechanize won’t be a problem, but if you start using it any regularity…)
the egg issue, I don’t see anything in mechanize’s package structure that suggests that py2exe will have any issues after installation.