make install doesn't install MySQLdb
jcharaoui opened this issue · 1 comments
jcharaoui commented
Using a MySQL database, the install process is interrupted like this :
Using /usr/local/share/Bookie/lib/python2.7/site-packages
Finished processing dependencies for bookie==0.5.0
bin/python bin/alembic upgrade head
Traceback (most recent call last):
File "bin/alembic", line 9, in <module>
load_entry_point('alembic==0.6.5', 'console_scripts', 'alembic')()
File "/usr/local/share/Bookie/local/lib/python2.7/site-packages/alembic/config.py", line 298, in main
CommandLine(prog=prog).main(argv=argv)
File "/usr/local/share/Bookie/local/lib/python2.7/site-packages/alembic/config.py", line 293, in main
self.run_cmd(cfg, options)
File "/usr/local/share/Bookie/local/lib/python2.7/site-packages/alembic/config.py", line 279, in run_cmd
**dict((k, getattr(options, k)) for k in kwarg)
File "/usr/local/share/Bookie/local/lib/python2.7/site-packages/alembic/command.py", line 125, in upgrade
script.run_env()
File "/usr/local/share/Bookie/local/lib/python2.7/site-packages/alembic/script.py", line 203, in run_env
util.load_python_file(self.dir, 'env.py')
File "/usr/local/share/Bookie/local/lib/python2.7/site-packages/alembic/util.py", line 212, in load_python_file
module = load_module_py(module_id, path)
File "/usr/local/share/Bookie/local/lib/python2.7/site-packages/alembic/compat.py", line 58, in load_module_py
mod = imp.load_source(module_id, path, fp)
File "dbversions/env.py", line 27, in <module>
bookie_config = load_bookie_ini(bookie_ini)
File "dbversions/env.py", line 19, in load_bookie_ini
initialize_sql(dict(ini.items("app:bookie")))
File "/usr/local/share/Bookie/bookie/models/__init__.py", line 49, in initialize_sql
engine = engine_from_config(settings, 'sqlalchemy.')
File "/usr/local/share/Bookie/local/lib/python2.7/site-packages/sqlalchemy/engine/__init__.py", line 366, in engine_from_config
return create_engine(url, **options)
File "/usr/local/share/Bookie/local/lib/python2.7/site-packages/sqlalchemy/engine/__init__.py", line 344, in create_engine
return strategy.create(*args, **kwargs)
File "/usr/local/share/Bookie/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 73, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/usr/local/share/Bookie/local/lib/python2.7/site-packages/sqlalchemy/connectors/mysqldb.py", line 63, in dbapi
return __import__('MySQLdb')
ImportError: No module named MySQLdb
Makefile:98: recipe for target 'bookie.db' failed
make: *** [bookie.db] Error 1
I can work around this problem by creating a symbolic link of Debian's MySQLdb into lib/python2.7/site-packages.
jcharaoui commented
I understand this is somewhat documented, but doesn't take into account the case where the database may already be configured for MySQL prior to running make install
.