Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've installed python 2.7 with the dmg-installer of the official python page. After typing which python in terminal, I get this:


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?

share|improve this question
up vote 1 down vote accepted

It seems that your installation of setuptools is obsolete.

If you want your "easy_install" match your updated python version, follow these steps:

Download the corresponding .egg file at Run it as if it were a shell script: sh setuptools-0.6c9-py2.7.egg This will install the new "easy_install" executable, compatible with your current version of python.

Hope this helps.

(more details at

share|improve this answer

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 so this is from memory.

To use easy_install for the 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

share|improve this answer
Thank you for your answer, you're rhight, easy_install is where you suggested. The path you provided does not exist: sudo: /usr/local/bin/easy_install: command not found – strauberry Jun 13 '11 at 12:34

After installing a new version of the setup tools you may find that you have multiple copies of easy_install installed.

Try: 'which easy_install'

If its not the right version, you'll probably find you have other links 'easy_install<tab>' should show something like:

PER-MMSX:actions doug$ easy_install
easy_install      easy_install-2.5  easy_install-2.6  easy_install-2.7  

Use 'sudo easy_install-2.7 ' to ensure that you're using exactly the right version.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.