gpt4 book ai didi

python - 导入时错误无法从 'cached_property' 导入名称 'werkzeug' [ `from werkzeug.utils import cached_property`]

转载 作者:行者123 更新时间:2023-12-05 01:12:56 31 4
gpt4 key购买 nike

关于导入“from flask_restplus import Api, Resource” api getting cannot import name 'cached_property from 'werkzeug'

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

引用:https://github.com/noirbizarre/flask-restplus/issues/777

关于python - 导入时错误无法从 'cached_property' 导入名称 'werkzeug' [ `from werkzeug.utils import cached_property`],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61256837/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com