Can't import flask because werkzeug Can't import flask because werkzeug flask flask

Can't import flask because werkzeug


I am asumming, that the wrong version of Werkzeug was installed in the fist place. This usually happens, when you have 2 versions of python installed, and you use 'pip' for installing dependancies rather than using 'pip3'. Hope this helped!


I had this problem with Yocto while installing python-flask from: http://git.yoctoproject.org/git/meta-virtualization.

The solution was to manually add python-werkzeug to my yocto image as well. I suspect that python-flask should depend upon python-werkzeug. Additionally, I had to add python-jinja2 as well to the image.


I faced same issue. I got this error when working in python virtual environment. I had to deactivate virtual environment. Then go to root user and install werkzeug using pip. After that it works in virtual environment.