找不到模块greenlet

时间:2014-03-26 21:23:46

标签: python google-app-engine flask

尝试在Google App Engine上安装https://github.com/miguelgrinberg/Flask-SocketIO,模块安装在lib / greenlet.so上,但未加载。

Traceback (most recent call last):
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 239, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 298, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 84, in LoadObject
    obj = __import__(path[0])
  File "/base/data/home/apps/s~adroit-nimbus-531/1.374699491503674061/main.py", line 23, in <module>
    from flask.ext.socketio import SocketIO, emit, join_room, leave_room
  File "/base/data/home/apps/s~adroit-nimbus-531/1.374699491503674061/lib/flask/exthook.py", line 81, in load_module
    reraise(exc_type, exc_value, tb.tb_next)
  File "/base/data/home/apps/s~adroit-nimbus-531/1.374699491503674061/lib/flask_socketio/__init__.py", line 1, in <module>
    from gevent import monkey
  File "/base/data/home/apps/s~adroit-nimbus-531/1.374699491503674061/lib/gevent/__init__.py", line 36, in <module>
    from gevent.hub import get_hub, iwait, wait
  File "/base/data/home/apps/s~adroit-nimbus-531/1.374699491503674061/lib/gevent/hub.py", line 8, in <module>
    import greenlet  # http://pypi.python.org/pypi/greenlet/
ImportError: dynamic module does not define init function (initgreenlet)

1 个答案:

答案 0 :(得分:3)

可能不起作用,因为它使用GAE上没有的C扩展名。

https://developers.google.com/appengine/docs/python/tools/libraries27

无论如何,GAE上还有其他工具(任务队列等)。