不能进口烧瓶

时间:2018-02-24 12:45:36

标签: python flask

在命令行python -c 'import flask'

输出:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ubuntu/.local/lib/python2.7/site-packages/flask/__init__.py", line 17, in <module>
    from werkzeug.exceptions import abort
  File "/home/ubuntu/.local/lib/python2.7/site-packages/werkzeug/__init__.py", line 151, in <module>
    __import__('werkzeug.exceptions')
  File "/home/ubuntu/.local/lib/python2.7/site-packages/werkzeug/exceptions.py", line 67, in <module>
    from werkzeug._internal import _get_environ
  File "/home/ubuntu/.local/lib/python2.7/site-packages/werkzeug/_internal.py", line 13, in <module>
    import inspect
  File "/usr/lib/python2.7/inspect.py", line 39, in <module>
    import tokenize
  File "/usr/lib/python2.7/tokenize.py", line 39, in <module>
    COMMENT = N_TOKENS
NameError: name 'N_TOKENS' is not defined

我该如何解决?

在我的烧瓶项目中遇到这个错误,虽然昨天一切都很好。

0 个答案:

没有答案