Reputation: 63
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.
Upvotes: 0
Views: 1562
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