Reputation: 9
I am getting this error when i try to run:
flask db upgrade
from flask_sqlalchemy import SQLAlchemy ModuleNotFoundError: No module named 'flask_sqlalchemy'
I verified that flask-sqlalchemy is already installed:
Requirement already satisfied: flask-sqlalchemy in ./venv/lib/python3.6/site-packages (2.4.4)
Upvotes: 0
Views: 6323
Reputation: 46
Are you using the correct version of Python? By installing flask_sqlalchemy and using Python3, make sure you install the module by typing pip3 install flask-sqlalchemy
, so the module gets installed in Python3 and not another version. If you want to use Python2, make sure using the normal command pip install flask-sqlalchemy
.
Upvotes: 3