ImportError: No module named sqlalchemy
Full error message
I'm unable to find a module in python ,though easy_install says its already installed. Any idea how to resolve this isseue? $ python -c "from flaskext.sqlalchemy import SQLAlchemy" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named sqlalchemy $ python -V Python 2.7 $ sudo easy_install sqlalchemy Searching for sqlalchemy Best match: SQLAlchemy 0.7.7 Adding SQLAlchemy 0.7.7 to easy-install.pth file Using /usr/lib/python2.7/site-packages Processing dependencies for sqlalchemy Finished processing dependencies for sqlalchemy $ sudo pip install SQLAlchemy --upgrade Requirement already up-to-date: SQLAlchemy in /usr/lib/python2.7/site-packages Cleaning up... Though pip says it's installed.But I can't find them in sys.path output. $ sudo python -c "import sys;print sys.path" ['', '/usr/lib/python2.7/site-packages/Flask_SQLAlchemy-0.15-py2.7.egg', '/usr/lib/python2.7/site-packages/Flask-0.8-py2.7.egg', '/usr/lib/python2.7/site-packages/Jinja2-2.6-py2.7.egg', '/usr/lib/python2.7/site-packages/Werkzeug-0.8.3-py2.7.egg', '/usr/lib/python2.7/site-packages/Flask_WTF-0.5.2-py2.7.egg', '/usr/lib/python2.7/site-packages/WTForms-0.6.3-py2.7.egg', '/usr/lib/python2.7/site-packages/Flask_Mail-0.6.1-py2.7.egg', '/usr/lib/python2.7/site-packages/blinker-1.2-py2.7.egg', '/usr/lib/python2.7/site-packages/lamson-1.1-py2.7.egg', '/usr/lib/python2.7/site-packages/python_daemon-1.6-py2.7.egg', '/usr/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg', '/usr/lib/python2.7/site-packages/mock-0.8.0-py2.7.egg', '/usr/lib/python2.7/site-packages/chardet-1.0.1-py2.7.egg', '/usr/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg', '/usr/lib/python2.7/site-packages/Flask_FlatPages-0.2-py2.7.egg', '/usr/lib/python2.7/site-packages/Markdown-2.1.1-py2.7.egg', '/usr/lib/python2.7/site-packages/PyYAML-3.10-py2.7-linux-i686.egg', '/usr/lib/python2.7/site-packages/uWSGI-1.0.3-py2.7.egg', '/usr/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-linux-i686.egg', '/usr/lib/python27.zip', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/lib/python2.7/site-packages', '/usr/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info']
Solutionsource: stackoverflow \u2197
Okay,I have re-installed the package via pip even that didn't help. And then I rsync'ed the entire /usr/lib/python-2.7 directory from other working machine with similar configuration to the current machine.It started working. I don't have any idea ,what was wrong with my setup. I see some difference "print sys.path" output earlier and now. but now my issue is resolved by this work around. EDIT:Found the real solution for my setup. upgrading "sqlalchemy only doesn't solve the issue" I also need to upgrade flask-sqlalchemy that resolved the issue.
API access
Get this solution programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/error/ca6ebbeefd69764a4061c72baf293a8d64c90ed0131c6ec9effec0e90b068b5fhash \u00b7 ca6ebbeefd69764a4061c72baf293a8d64c90ed0131c6ec9effec0e90b068b5f