Can't import flask because werkzeug

11,168

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!

Share:
11,168

Related videos on Youtube

Everyone_Else
Author by

Everyone_Else

Updated on September 14, 2022

Comments

  • Everyone_Else
    Everyone_Else over 1 year

    When I use from flask import *, I get the error

    ImportError: No module named werkzeug.exceptions

    However, when I do pip freeze, I can see that Werkzeug==0.11.11 is indeed installed. How can I fix this?