我已經構建了一個在App Engine上託管的博客,並且我想實施降價。在Github上查找它之後我已經安裝了他的markdown2模塊,我可以在終端控制檯中使用它。爲什麼我無法將markdown2導入到我的App Engine應用程序中?
但是,當我嘗試在我的程序中導入相同的模塊時,我遇到了一個錯誤,指出沒有這樣的模塊。我什至試圖使用sys.path方法,但我仍然得到錯誤。
爲我的錯誤回溯是:
File "/home/bigb/google_projects/google_appengine/google/appengine/runtime/wsgi.py", line 189, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/home/bigb/google_projects/google_appengine/google/appengine/runtime/wsgi.py", line 227, in _LoadHandler
handler = __import__(path[0])
File "/home/bigb/google_projects/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 676, in Decorate
return func(self, *args, **kwargs)
File "/home/bigb/google_projects/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 1859, in load_module
return self.FindAndLoadModule(submodule, fullname, search_path)
File "/home/bigb/google_projects/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 676, in Decorate
return func(self, *args, **kwargs)
File "/home/bigb/google_projects/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 1723, in FindAndLoadModule
description)
File "/home/bigb/google_projects/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 676, in Decorate
return func(self, *args, **kwargs)
File "/home/bigb/google_projects/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 1666, in LoadModuleRestricted
description)
File "/home/bigb/google_projects/my-ramblings/blog.py", line 12, in <module>
import markdown2
真的很有幫助,我已經知道我必須與sys混合才能將第三方庫導入到App Engine中,但我不知道該怎麼做。感謝這 – Bhargav
不客氣:) – 2013-07-16 05:07:17