Can't import flask because werkzeug
Solution 1
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.
Solution 2
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!
Related videos on Youtube
Everyone_Else
Updated on September 14, 2022Comments
-
Everyone_Else over 1 year
When I use
from flask import *
, I get the errorImportError: No module named werkzeug.exceptions
However, when I do
pip freeze
, I can see thatWerkzeug==0.11.11
is indeed installed. How can I fix this?