0

I have built a blog which is being hosted on App Engine, and I want to implement markdown. I have installed he markdown2 module after looking it up on Github and I can use it in the terminal console.

But when I try to import the same module in my program, I hit an error which states that there is no such module. I even tried to use sys.path method but I still get the error.

The traceback for my error is :

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
4

2 回答 2

2

您本地计算机上的第三方库不会自动包含在 Google App Engine 中。

您必须将这些库直接添加到您的源代码中。这些线程详细解释了如何执行此操作:

1)如何使用 Google App Engine 管理第三方 Python 库?(虚拟环境?点子?)

2)上传Python第三方库

3)如何在 Google App Engine 中包含第三方 Python 库?

于 2013-07-16T04:48:02.227 回答
0

将“markdown”源代码文件夹复制并粘贴到您的应用程序文件夹中。它会起作用的。

于 2013-07-16T04:51:02.173 回答