close

[Solved] ImportError: No module named sqlalchemy

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error ImportError: No module named sqlalchemy in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How ImportError: No module named sqlalchemy Error Occurs?

Today I get the following error ImportError: No module named sqlalchemy in python.

How To Solve ImportError: No module named sqlalchemy Error ?

  1. How To Solve ImportError: No module named sqlalchemy Error ?

    To Solve ImportError: No module named sqlalchemy Error Did you install flask-sqlalchemy? It looks like you have SQLAlchemy installed but not the Flask extension. Try pip install Flask-SQLAlchemy in your project's virtualenv to install it from PyPI.

  2. ImportError: No module named sqlalchemy

    To Solve ImportError: No module named sqlalchemy Error Did you install flask-sqlalchemy? It looks like you have SQLAlchemy installed but not the Flask extension. Try pip install Flask-SQLAlchemy in your project's virtualenv to install it from PyPI.

Solution 1

Install Flask-SQLAlchemy with pip in your virtualenv:

pip install flask_sqlalchemy

Then import flask_sqlalchemy in your code:

from flask_sqlalchemy import SQLAlchemy

Solution 2

Did you install flask-sqlalchemy? It looks like you have SQLAlchemy installed but not the Flask extension. Try pip install Flask-SQLAlchemy in your project’s virtualenv to install it from PyPI.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read