1. Install EasyInstall(sudo apt-get install python-setuptools python-dev build-essential)

  2. easy_install mechanize(需要在root权限下)

Easy install will automatically download the latest source code release and install it.

Source code release

  1. Download the source from one of the links below

  2. Unpack the source distribution and change directory to the resulting top-level directory.

  3. python install

This is a stable release.

      python install

 root@yangjie-v:/usr/local/lib/python2.6/dist-packages# ls
easy-install.pth  mechanize-0.2.4-py2.6.egg