我有 Ubuntu OpenStack Icehouse 來安裝我正在使用的 Sahara本指南:
當我嘗試建立資料庫架構時
sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade head
我發現:
回溯(最近一次呼叫最後一次):
檔案“sahara-venv/bin/sahara-db-manage”,第 10 行,在
sys.exit(main())
檔案“/home/ash/sahara-venv/local/ lib/ python2.7/site-packages/sahara/db/migration/cli.py”,第 110 行,在主
CONF.command.func(config, CONF.command.name)
檔案“/home/ash/sahara- venv/local /lib/python2.7/site-packages/sahara/db/migration/cli.py”,第 49 行,在 do_upgrade_downgrade do_alembic_command (
config, cmd, revision, sql=CONF.com.sql.sql
home/ash/ sahara-venv/local/lib/python2.7/site-packages/sahara/db/migration/cli.py”,第 30 行,在 do_alembic_command
getattr(alembic_cmd, cmd)(config, *args, * *kwargs)
檔案中“ /home/ash/sahara-venv/local/lib/python2.7/site-packages/alembic/command.py”,第 165 行,在升級
script.run_env()
檔案“/home/ ash/sahara-venv/local /lib/python2.7/site-packages/alembic/script.py”,第 382 行,在 run_env
util.load_python_file(self.dir, 'env.py')
檔案“/home/ ash/sahara-venv/local/ lib/python2.7/site-packages/alembic/util.py”,第 241 行,在 load_python_file
module = load_module_py(module_id, path) 檔案“/home/ash/sahara-venv/ash/sahara-venv/ash/sahara-venv/ash/sahara-venv/ash/sahara-venv/ash/sahara-venv/ash/sahara-venv/ local/lib/python2.7/site -packages/alembic/compat.py”,第79 行,在load_module_py mod = imp.load_source(module_id, path, fp) 檔案“/home/ash/sahara-venv/local/ lib/python2.7/site-packages/ sahara/db/migration/alembic_migrations/env.py”,第95 行,在run_migrations_online() 檔案“/home/ash/sahara-venv/local/lib/python2.7/ site-packages/sahara/db/migration/alembic_migrations /env.py”,第79 行,在run_migrations_online poolclass=pool.NullPool 中)檔案“/home/ash/sahara-venv/local/lib/python2.7/site -packages/sqlalchemy/engine/在裡面.py”,第362 行,在create_engine 回傳strategy.create(*args, **kwargs) 檔案“/home/ash/sahara-venv/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies . py”,第74 行,在建立dbapi = dialect_cls.dbapi(**dbapi_args) 檔案“/home/ash/sahara-venv/local/lib/python2.7/site-packages/sqlalchemy/connectors/mysqldb.py 」中,第 64 行,在 dbapi 返回中進口('MySQLdb')導入錯誤:沒有名為 MySQLdb 的模組
我試過sudo apt-get install python-mysqldb
但問題並沒有解決。