python – 谷歌应用引擎中的’ImportError:没有名为decorator的模块’

python – 谷歌应用引擎中的’ImportError:没有名为decorator的模块’,第1张

概述我已经通过手动将代码添加到文件夹lib / validators中,将验证器库添加到我的Google应用引擎中.然后在我的代码中我添加了这一行 from validators.utils import ValidationFailure 当我运行我的应用程序时,我从这一行获得了一个例外: from validators.utils import ValidationFailure File " 我已经通过手动将代码添加到文件夹lib / valIDators中,将验证器库添加到我的Google应用引擎中.然后在我的代码中我添加了这一行

from valIDators.utils import ValIDationFailure

当我运行我的应用程序时,我从这一行获得了一个例外:

from valIDators.utils import ValIDationFailure  file "lib/valIDators/__init__.py",line 1,in <module>    from .between import between  file "lib/valIDators/between.py",line 2,in <module>    from .utils import valIDator  file "lib/valIDators/utils.py",line 5,in <module>    from decorator import decoratorimportError: No module named decorator

如果我从python intcritor中的decorator import decorator运行,它按预期工作.

但是,当我在本地开发服务器的“交互式控制台”中尝试它时,我得到了同样的错误

我该如何解决此异常?

解决方法 这对我有用,我专门为Python 3.4安装了装饰器包:

sudo python3.4 -m pip install decorator  # specifically Python 3.4
总结

以上是内存溢出为你收集整理的python – 谷歌应用引擎中的’ImportError:没有名为decorator的模块’全部内容,希望文章能够帮你解决python – 谷歌应用引擎中的’ImportError:没有名为decorator的模块’所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1193447.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-03
下一篇 2022-06-03

发表评论

登录后才能评论

评论列表(0条)

保存