Flask app wont launch 'ImportError: cannot import name 'cached_property' from 'werkzeug' ' Flask app wont launch 'ImportError: cannot import name 'cached_property' from 'werkzeug' ' flask flask

Flask app wont launch 'ImportError: cannot import name 'cached_property' from 'werkzeug' '


The proper answer for May 2020: flask-restplus is dead, move to flask-restx.

From noirbizarre/flask-restplus#778 (comment):

flask-restplus work has been discontinued due to maintainers not having pypi keys. See the drop in replacement, flask-restx. It's an official fork by the maintainer team. We have already fixed the issue there

From noirbizarre/flask-restplus#777 (comment):

No. Flask-restplus is no longer maintained. The former maintainers do not have privileges to push to pypi, and after many months of trying, we forked the project. Check out flask-restx. It's a drop in replacement and we are roadmapping, designing, and making fixes...for instance, we already patched for Werkzeug

So the real solution is to move to flask-restx rather than pinning to an old version of Werkzeug.


Downgrading to Werkzeug==0.16.1 solves this

see https://github.com/noirbizarre/flask-restplus/issues/777#issuecomment-583235327

EDIT

Wanted to add that a permanent(long term) solution would be to move to flask_restx as flask-restplus is no longer being maintained.

See how to migrate from flask-restplus