0

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?

  • 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
0

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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