On OS X, Python interpreter instances are typically installed as so-called Framework builds which means that there is a bin
directory within the framework which is typically (but not always) the installation destination for python scripts, such as easy_install
. If you are not using the Apple-supplied python (in /usr/bin/) which has its own easy_install
instance there, you should ensure that the framework bin directory of the desired python is on your shell search PATH and precedes /usr/bin
. In particular, if you are using the python installed by the python.org installer, your PATH should look something like this:
$ echo $PATH
/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin
That ensures that the proper easy_install
will be found first. If you are using a MacPorts python, it should look like this:
$ echo $PATH
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin:/opt/local/bin:/usr/bin:/bin
EDIT: By the way, the egg that you downloaded appears to be for Python 2.5 and judging from a previous question, you may be wanting to use it with python 2.6. If you just use the command
$ easy_install mechanize
it should automatically download the proper egg, if available, or the source and do the necessary build and install steps.