Search code examples
windowspycharm

No module named 'flask' despite package being isntalled?


I was previously using Thonny as my IDE which was good. But I wanted GitHub integration so I decided to switch to PyCharm.

I created a virtual environment for the project inside of the project directory and installed all of the packages including Flask, Flask-WTF, Flask-Login, PyMongo, etc.

When I run the file I get 'No module named 'flask''

I am not sure what I am doing wrong!


Solution

  • Switch to virtualenv by your OS-specific command and then install flask and its modules.

    For more info: Flask ImportError: No Module Named Flask