我无法导入Flask 1.0或突然运行开发服务器。
Traceback (most recent call last):
File "/data/data/ru.iiec.pydroid3/files/accomp_files/iiec_hackrun/iiec_hackrun.py", line 29, in <module> start(fakepyfile,mainpyfile) File "/data/data/ru.iiec.pydroid3/files/accomp_files/iiec_hackrun/iiec_hackrun.py", line 28, in start exec(open(mainpyfile).read(), __main__.__dict__) File "<string>", line 6, in <module> File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/flask/__init__.py", line 21, in <module> from .app import Flask, Request, Response File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/flask/app.py", line 25, in <module> from . import cli, json File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/flask/json/__init__.py", line 21, in <module> from itsdangerous import json as _json File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/itsdangerous.py", line 38, in <module> import simplejson as json
File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/simplejson/__init__.py", line 115, in <module>
from .encoder import JSONEncoder, JSONEncoderForHTML
File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/simplejson/encoder.py", line 15, in <module>
c_encode_basestring_ascii, c_make_encoder = _import_speedups()
File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/simplejson/encoder.py", line 12, in _import_speedups
return _speedups.encode_basestring_ascii, _speedups.make_encoder
AttributeError: module 'markupsafe._speedups' has no attribute 'encode_basestring_ascii'
答案 0 :(得分:0)
我建议您使用pipenv并再试一次。
pip install pipenv
pipenv shell --three
pipenv install flask