{"id":924,"hash":"ca6ebbeefd69764a4061c72baf293a8d64c90ed0131c6ec9effec0e90b068b5f","pattern":"ImportError: No module named sqlalchemy","full_message":"I'm unable to find a module in python ,though easy_install says its already installed.\nAny idea how to resolve this isseue? \n\n$ python -c \"from flaskext.sqlalchemy import SQLAlchemy\"\nTraceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: No module named sqlalchemy\n\n$ python -V\nPython 2.7\n\n$ sudo easy_install sqlalchemy\nSearching for sqlalchemy\nBest match: SQLAlchemy 0.7.7\nAdding SQLAlchemy 0.7.7 to easy-install.pth file\n\nUsing /usr/lib/python2.7/site-packages\nProcessing dependencies for sqlalchemy\nFinished processing dependencies for sqlalchemy\n\n  $ sudo pip install SQLAlchemy --upgrade Requirement already\n  up-to-date: SQLAlchemy in /usr/lib/python2.7/site-packages Cleaning\n  up...\n\nThough pip says it's installed.But I can't find them in sys.path output.\n\n$ sudo python -c \"import sys;print sys.path\" ['',\n'/usr/lib/python2.7/site-packages/Flask_SQLAlchemy-0.15-py2.7.egg',\n'/usr/lib/python2.7/site-packages/Flask-0.8-py2.7.egg',\n'/usr/lib/python2.7/site-packages/Jinja2-2.6-py2.7.egg',\n'/usr/lib/python2.7/site-packages/Werkzeug-0.8.3-py2.7.egg',\n'/usr/lib/python2.7/site-packages/Flask_WTF-0.5.2-py2.7.egg',\n'/usr/lib/python2.7/site-packages/WTForms-0.6.3-py2.7.egg',\n'/usr/lib/python2.7/site-packages/Flask_Mail-0.6.1-py2.7.egg',\n'/usr/lib/python2.7/site-packages/blinker-1.2-py2.7.egg',\n'/usr/lib/python2.7/site-packages/lamson-1.1-py2.7.egg',\n'/usr/lib/python2.7/site-packages/python_daemon-1.6-py2.7.egg',\n'/usr/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg',\n'/usr/lib/python2.7/site-packages/mock-0.8.0-py2.7.egg',\n'/usr/lib/python2.7/site-packages/chardet-1.0.1-py2.7.egg',\n'/usr/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg',\n'/usr/lib/python2.7/site-packages/Flask_FlatPages-0.2-py2.7.egg',\n'/usr/lib/python2.7/site-packages/Markdown-2.1.1-py2.7.egg',\n'/usr/lib/python2.7/site-packages/PyYAML-3.10-py2.7-linux-i686.egg',\n'/usr/lib/python2.7/site-packages/uWSGI-1.0.3-py2.7.egg',\n'/usr/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-linux-i686.egg',\n'/usr/lib/python27.zip', '/usr/lib/python2.7',\n'/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk',\n'/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload',\n'/usr/lib/python2.7/site-packages',\n'/usr/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info']","ecosystem":"pypi","package_name":"sqlalchemy","package_version":null,"solution":"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\nthe 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.\n\nEDIT: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.","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/10572498/importerror-no-module-named-sqlalchemy","votes":85,"created_at":"2026-04-19T04:52:00.974432+00:00","updated_at":"2026-04-19T04:52:00.974432+00:00"}