On OS X, Python interpreter instances are usually installed as the so-called Framework assemblies, which means that the bin directory exists in the structure, which usually (but not always) is the installation location for python scripts such as easy_install . If you are not using the supplied Apple python (at / usr / bin /), which has its own easy_install instance, you must make sure that the bin bin directory of the desired python is located in PATH to search for the shell and precedes /usr/bin . In particular, if you are using 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
This ensures that the correct easy_install is found first. If you are using Python for MacPorts, 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 you downloaded for Python 2.5, and judging by the previous question, you can use it with python 2.6. If you just use the command
$ easy_install mechanize
he should automatically load the proper egg, if available, or source, and complete the necessary assembly and installation steps.
Ned deily
source share