我正在尝试在 Ubuntu 12.04 上安装和运行 Camelot 框架。但从错误来看,问题似乎是 sqlalchemy。我已经安装了 camelot:
pip install camelot
它安装没有任何问题。我尝试同时升级 sqlalchemy 和 camelot,但它会引发异常并且在我运行时不起作用:
python -m camelot.bin.camelot_admin
一些版本:
In [1]: import camelot
In [2]: camelot.__version__
Out[2]: '12.06.29'
In [3]: import sqlalchemy
In [4]: sqlalchemy.__version__
Out[4]: '0.8.0b2'
这是回溯:
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/dist-packages/camelot/bin/camelot_admin.py", line 263, in <module>
main()
File "/usr/local/lib/python2.7/dist-packages/camelot/bin/camelot_admin.py", line 255, in main
meta()
File "/usr/local/lib/python2.7/dist-packages/camelot/bin/camelot_admin.py", line 243, in meta
from camelot.bin.meta import launch_meta_camelot
File "/usr/local/lib/python2.7/dist-packages/camelot/bin/meta.py", line 34, in <module>
from camelot.admin.application_admin import ApplicationAdmin
File "/usr/local/lib/python2.7/dist-packages/camelot/admin/application_admin.py", line 34, in <module>
from camelot.admin.action import application_action, form_action, list_action
File "/usr/local/lib/python2.7/dist-packages/camelot/admin/action/__init__.py", line 25, in <module>
from application_action import ( ApplicationActionGuiContext,
File "/usr/local/lib/python2.7/dist-packages/camelot/admin/action/application_action.py", line 31, in <module>
from camelot.core.orm import Session
File "/usr/local/lib/python2.7/dist-packages/camelot/core/orm.py", line 48, in <module>
from sqlalchemy.ext.declarative import ( declarative_base,
ImportError: cannot import name _declarative_constructor