2011-04-17 60 views
2

我真的想使用他們的Python測試平臺庫編寫谷歌應用程序引擎測試的進口,但每次我嘗試使用導入它錯誤時,試圖做測試平臺

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的新手,所以這可能是我錯過的基本東西。

回答

4

這是PIL的基於C的部分。正確安裝PIL。

+0

謝謝,關於如何安裝PIL的說明可以在這裏找到:http://code.google.com/appengine/docs/python/images/installingPIL.html – PropellerHead 2011-04-17 08:27:37

+0

brew install pil – 2011-04-20 22:04:18