Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 am getting an error when I run Python programs that imports peewee:

ImportError: No module named peewee

The same program works fine under Ubuntu 12.04.

I used pip to install peewee, and it confirms that it is installed:

$ pip install --upgrade peewee
Requirement already up-to-date: peewee in /usr/local/lib/python2.7/site-packages
Cleaning up...

Any ideas?

share|improve this question
Is the importing program using the right version of python? – D_Bye Mar 21 '13 at 16:08
Yes, running 2.7... – hstr Mar 21 '13 at 16:14
But is it using /usr/local/bin/python, or the system default, /usr/bin/python? – D_Bye Mar 21 '13 at 16:21
No ... you are quite right! Changing the shebang solved the problem. Please post an answer. – hstr Mar 21 '13 at 16:26
up vote 0 down vote accepted

The peewee module appears to be installed under /usr/local, but the OS X system default python lives in /usr/bin. Check the shebang line of the program that's failing, and make sure it's using the correct python.

share|improve this answer
And 1000 thanks! – hstr Mar 21 '13 at 18:49

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.