sqlalchemy – ImportError: No module named flask_sqlalchemy w/ 2 Versions of Python Installed
sqlalchemy – ImportError: No module named flask_sqlalchemy w/ 2 Versions of Python Installed
I think you have a mismatch between your pip and python versions.
check your pip version pip –version,
if it is pip3
you can try this,
sudo apt-get install python3-sqlalchemy
This should work.
~$ python3
>>import sqlalchemy
Did you install flaskext.sqlalchemy? It looks like you may have only installed the SQLAlchemy
package and NOT the Flask Extension. Try pip install Flask-SQLAlchemy
sqlalchemy – ImportError: No module named flask_sqlalchemy w/ 2 Versions of Python Installed
If you are on mac, try
pip install flask-sqlalchemy
instead of
pip3 install flask-sqlalchemy
.
It works with some warnings, but was able to succesfully connect to the database and create the tables.
FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to suppress this warning.