![无法在 Mac OS X Mountain Lion 上使用 peewee](https://linux22.com/image/30187/%E6%97%A0%E6%B3%95%E5%9C%A8%20Mac%20OS%20X%20Mountain%20Lion%20%E4%B8%8A%E4%BD%BF%E7%94%A8%20peewee.png)
当我运行导入 peewee 的 Python 程序时出现错误:
ImportError: No module named peewee
同样的程序在 Ubuntu 12.04 下运行良好。
我使用pip安装peewee,确认已安装:
$ pip install --upgrade peewee
Requirement already up-to-date: peewee in /usr/local/lib/python2.7/site-packages
Cleaning up...
有任何想法吗?
答案1
该peewee
模块似乎安装在 下/usr/local
,但 OS X 系统默认 python 位于/usr/bin
.检查失败的程序的 shebang 行,并确保它使用正确的 python。