ModuleNotFoundError:没有名为' tasklets'

时间:2018-06-18 12:27:05

标签: python python-3.x google-app-engine app-engine-ndb google-app-engine-python

我正在玩GAE,但我意识到当我尝试启动.py文件时,我收到此错误。我能做什么? 感谢

  python3 test.py runserver
Traceback (most recent call last):
      File "test.py", line 6, in <module>
        from google.appengine.ext import ndb
      File "/usr/local/lib/python3.6/dist-packages/google/appengine/ext/ndb/__init__.py", line 7, in <module>
        from tasklets import *
    ModuleNotFoundError: No module named 'tasklets'

2 个答案:

答案 0 :(得分:1)

NDB library仅适用于标准环境GAE,仅适用于python 2.7。

因此,要么切换到标准环境(和python 2.7),要么使用Using Cloud Datastore的灵活环境说明。

感兴趣:How to tell if a Google App Engine documentation page applies to the standard or the flexible environment

答案 1 :(得分:-1)

使用此命令安装它

pip install stacklesslib