尝试导入testbed时出错

时间:2011-04-17 05:51:35

标签: python unit-testing google-app-engine

我真的想使用他们的python testbed库为Google App Engine编写测试,但每次我尝试使用

导入它
from google.appengine.ext import testbed

我收到以下错误:

File "/Users/lhundeboel/Projects/busybeeapp/tests/test_something.py", line 1, in <module>
    from google.appengine.ext import testbed
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/testbed/__init__.py", line 116, in <module>
    from google.appengine.api.images import images_stub
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/images/images_stub.py", line 37, in <module>
    import _imaging
ImportError: No module named _imaging

有谁知道_imaging模块是什么,以及如何导入它? 我必须承认,我是Python的新手,所以这可能是我错过的基本内容。

1 个答案:

答案 0 :(得分:4)

这是PIL的基于C的部分。正确安装PIL。