Categories
Python Answers

How to fix the Flask ImportError: No Module Named Flask error with Python Flask?

Spread the love

Sometimes, we want to fix the Flask ImportError: No Module Named Flask error with Python Flask.

In this article, we’ll look at how to fix the Flask ImportError: No Module Named Flask error with Python Flask.

How to fix the Flask ImportError: No Module Named Flask error with Python Flask?

To fix the Flask ImportError: No Module Named Flask error with Python Flask, we install the flask package.

We create a new virtualenv with

virtualenv flask

then we cd to the virtualenv with

cd flask

And then we activate it with

source bin/activate

Then we install flask in the virtualenv with

pip install flask

Conclusion

To fix the Flask ImportError: No Module Named Flask error with Python Flask, we install the flask package.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *