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.