Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.