您需要確保您下載的App Engine SDK位於您的Python路徑中。您可以檢查通過交互運行蟒蟒什麼認爲它的路徑:
$ python
>>> import sys
>>> sys.path
['', '/Library/Python/2.7/site-packages/mock-1.0.1-py2.7.egg', '/usr/local/lib/wxPython-2.9.5.0/lib/python2.7/site-packages', '/usr/local/lib/wxPython-2.9.5.0/lib/python2.7/site-packages/wx-2.9.5-osx_cocoa', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages', '/usr/local/lib/wxPython-2.9.5.0/lib/python2.7']
或者你可以在運行時SDK添加到Python路徑。例如,如果您已下載並解壓縮到/ home/username/google_appengine,則可以在腳本中修改您的Python路徑:
sys.path.append('/home/username/google_appengine')
import dev_appserver
dev_appserver.fix_sys_path()
from google.appengine.ext.webapp.util import run_wsgi_app