Austin Griffith
Austin Griffith

Reputation: 63

ModuleNotFoundError: No module named 'sqlalchemy' -- Conda package manager

I am quite new to flask and still a beginner in python and I am running into package issues with sqlalchemy. I have created a virtual environment with conda called flask_app_env and it is active as I show in the terminal output and then executed the below commands in terminal. I have used pip package manager to install sqlalchemy among the other flask packages.

Python version- 3.7.4 but when I try to execute the command from sqlalchemy import create_engine in terminal it throws the error: ModuleNotFoundError: No module named 'sqlalchemy'

Any direction would be much appreciated.

lask

Upvotes: 0

Views: 1562

Answers (1)

gaska
gaska

Reputation: 56

I had the same problem. When running the script from crontask I was getting the same error. However, after running the task from terminal, I got additinaly error on missing 'psycopg2' module, which is a database driver for postgres used by SQLAlchemy. Simply: conda install psycopg2 solved the problem.

Upvotes: 1

Related Questions