0
votes

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 intalled:

Requirement already satisfied: flask-sqlalchemy in ./venv/lib/python3.6/site-packages (2.4.4)

1

1 Answers

0
votes

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.