Why is python's "easy_install" installing into the wrong directory? I've installed python 2.7 with the dmg-installer of the official python page. After typing which python in terminal, I get this:

/Library/Frameworks/Python.framework/Versions/2.7/bin/python

But when I want to install a package with easy_install, for example like this easy_install pycassa, I get the message Installed /Library/Python/2.6/site-packages/pycassa-1.1.0-py2.6.egg, what is obviously the wrong path. So when I try to use the installed package with import pycassa I get the error "no module named pycassa".

So how can I fix this issue best?
Find out where easy_install is by in terminal 

which easy_install


I suspect that it will be /usr/bin which is Apple's python 2.6

EDIT: I don't have the python.org python so this is from memory.

To use easy_install for the python.org 2.7 use /usr/local/bin/easy_install or /Library/Frameworks/Python.framework/Versions/2.7/bin/easy_install

Also easy_install is not in the Python standard library so you would have to install a package either setuptools or distribute I think the latter is now the preferred one.

To check what easy_install does look at the first line and see what python is used in the #! line