4

我一直在尝试从 pip 安装后运行 Excalibur,它要求我安装 camelot,之后弹出此错误,

Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/dev/.local/lib/python3.9/site-packages/excalibur/__main__.py", line 16, in <module>
    main()
  File "/home/dev/.local/lib/python3.9/site-packages/excalibur/__main__.py", line 10, in main
    from excalibur.cli import cli
  File "/home/dev/.local/lib/python3.9/site-packages/excalibur/cli.py", line 10, in <module>
    from .tasks import split, extract
  File "/home/dev/.local/lib/python3.9/site-packages/excalibur/tasks.py", line 13, in <module>
    from camelot.ext.ghostscript import Ghostscript
ModuleNotFoundError: No module named 'camelot.ext'

此输出显示当我尝试运行此模型、initdb 或 webserver 命令时,我尝试了很多方法来解决,但没有什么对我有用

4

3 回答 3

8

https://githubmemory.com/repo/camelot-dev/excalibur/issues/144在大量安装命令失败后,此修复对我有用。

我收到的错误消息:

Traceback (most recent call last):
  File "/mnt/PERSONAL/TECH/python-scratch/python-virtual-environments/py3.8/bin/excalibur", line 5, in <module>
    from excalibur.cli import cli
  File "/mnt/PERSONAL/TECH/python-scratch/python-virtual-environments/py3.8/lib/python3.8/site-packages/excalibur/cli.py", line 10, in <module>
    from .tasks import split, extract
  File "/mnt/PERSONAL/TECH/python-scratch/python-virtual-environments/py3.8/lib/python3.8/site-packages/excalibur/tasks.py", line 13, in <module>
    from camelot.ext.ghostscript import Ghostscript
ModuleNotFoundError: No module named 'camelot.ext'

所以我编辑了提到的tasks.py文件,

改为from camelot.ext.ghostscript import Ghostscript _ from ghostscript import Ghostscript

然后它起作用了。在此之前我刚刚安装了 Ghostscript,可能最近的软件包有变化。

于 2021-11-14T18:20:45.040 回答
1

尝试这个

pip install camelot-py
于 2021-10-26T07:31:46.240 回答
1

您可以尝试使用 conda 安装: conda install -c conda-forge camelot-py

官方安装文档:https ://camelot-py.readthedocs.io/en/master/user/install.html#install

此外,您应该检查是否正确设置了 python 的路径。

于 2021-10-26T10:00:22.143 回答