我有 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.command.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/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 返回策略.create(*args, **kwargs) 文件“/home/ash/sahara-venv/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py”, 第 74 行, 在 create dbapi = dialect_cls.dbapi(**dbapi_args) 文件“/home/ash/sahara-venv/local/lib/python2.7/site-packages/sqlalchemy/connectors/mysqldb.py”, 第 64 行, 在 dbapi 返回进口(‘MySQLdb’)ImportError:没有名为 MySQLdb 的模块
我试过sudo apt-get install python-mysqldb
但问题并没有解决。