Python 错误:无法导入名称';缓存的#u属性';从';werkzeug';导入[`from werkzeug.utils import cached_属性`]时

Python 错误:无法导入名称';缓存的#u属性';从';werkzeug';导入[`from werkzeug.utils import cached_属性`]时,python,flask-restplus,Python,Flask Restplus,在导入“从flask_restplus导入Api,资源”时,Api获取无法从“werkzeug”导入名称“cached_属性” Python version : Python 3.7.2rc1 pip freeze output aniso8601==8.0.0 attrs==19.3.0 autopep8==1.5.1 click==7.1.1 Flask==1.1.2 Flask-RESTful==0.3.8 flask-restplus==0.13.0 Flask-WTF==0.14.3

在导入“从flask_restplus导入Api,资源”时,Api获取无法从“werkzeug”导入名称“cached_属性”

Python version : Python 3.7.2rc1
pip freeze output 
aniso8601==8.0.0
attrs==19.3.0
autopep8==1.5.1
click==7.1.1
Flask==1.1.2
Flask-RESTful==0.3.8
flask-restplus==0.13.0
Flask-WTF==0.14.3
importlib-metadata==1.6.0
itsdangerous==1.1.0
Jinja2==2.11.1
jsonschema==3.2.0
MarkupSafe==1.1.1
pycodestyle==2.5.0
pyrsistent==0.16.0
pytz==2019.3
six==1.14.0
Werkzeug==1.0.1
WTForms==2.2.1
zipp==3.1.0
On importing  from flask_restplus import Api, Resource  getting  below error : 
cannot import name 'cached_property' from 'werkzeug'



tried solution , importing [ `from werkzeug.utils import cached_property` ] which is not helping getting same error

通过将werkzeug.utils降级为werkzeug==0.16.1,解决了我的问题

pip install Werkzeug==0.16.1

参考资料:

通过将werkzeug.utils降级为werkzeug==0.16.1,解决了我的问题

pip install Werkzeug==0.16.1

参考:

cached_属性
最近在1.0版本中被移动到了
werkzeug.utils
。您使用的是哪个版本的
werkzeug
?如果您使用的是较旧的版本,请尝试直接从
werkzeug
打印。werkzeug==1.0.1
cached\u属性最近在1.0版本中移动到
werkzeug.utils
。您使用的是哪个版本的
werkzeug
?如果您使用的是较旧的版本,请尝试直接从
werkzeug
.werkzeug==1.0.1打印