Reputation: 45
I have flask installed via virtualenv, and I used source bin/activate
to use flask. Flask returns fine, but I cannot import sqlalchemy or flask-sqlalchemy (or flask_sqlalchemy) at all.
I used pip list
and it shows that both installations are there. My Mac is a fresh install, and I have found no resolutions online. I feel like this is a $PATH error, but I am not certain. Any help at all?
(project) ➜ project pip list
click (6.4)
Flask (0.11.dev0)
Flask-SQLAlchemy (2.1)
itsdangerous (0.24)
Jinja2 (2.8)
MarkupSafe (0.23)
pip (8.1.1)
setuptools (20.6.7)
SQLAlchemy (1.0.12)
Werkzeug (0.11.5)
wheel (0.29.0)
(project) ➜ project flask-sqlalchemy
zsh: command not found: flask-sqlalchemy
(project) ➜ project flask_sqlalchemy
zsh: command not found: flask_sqlalchemy
(project) ➜ project sqlalchemy
zsh: command not found: sqlalchemy
Upvotes: 1
Views: 4675
Reputation: 7584
It looks like you're trying to somehow run the python modules right from the command line (zsh in this case). Does it work if you launch a python interpreter and then use import sqlalchemy
?
Upvotes: 2