我的环境规格
python --version
Python 3.7.6
anaconda --version
anaconda 命令行客户端(1.7.2 版)
sw_vers
产品名称:Mac OS X
产品版本:10.15.2
构建版本:19C57
我
使用以下命令camelot
从 conda-forge安装。
conda install -c conda-forge camelot-py
当我尝试导入camelot
以进行 pdf 解析和文本提取时附加日志。
Traceback (most recent call last):
File "/~/PycharmProjects/Utilities/rosblancos/pdf-utilities/pdf-element-extractor.py", line 1, in <module>
import camelot
File "/~/.conda/envs/Utilities/lib/python3.7/site-packages/camelot/__init__.py", line 6, in <module>
from .io import read_pdf
File "/~/.conda/envs/Utilities/lib/python3.7/site-packages/camelot/io.py", line 5, in <module>
from .handlers import PDFHandler
File "/~/.conda/envs/Utilities/lib/python3.7/site-packages/camelot/handlers.py", line 9, in <module>
from .parsers import Stream, Lattice
File "/~/.conda/envs/Utilities/lib/python3.7/site-packages/camelot/parsers/__init__.py", line 4, in <module>
from .lattice import Lattice
File "/~/.conda/envs/Utilities/lib/python3.7/site-packages/camelot/parsers/lattice.py", line 27, in <module>
from ..image_processing import (
File "/~/.conda/envs/Utilities/lib/python3.7/site-packages/camelot/image_processing.py", line 5, in <module>
import cv2
ImportError: dlopen(/~/.conda/envs/Utilities/lib/python3.7/site-packages/cv2.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libglib-2.0.0.dylib
Referenced from: /~/.conda/envs/Utilities/lib/libharfbuzz.0.dylib
Reason: Incompatible library version: libharfbuzz.0.dylib requires version 5601.0.0 or later, but libglib-2.0.0.dylib provides version 0.0.0
Process finished with exit code 1
我用谷歌搜索了上面的错误,发现了这个问题。但是,我无法解决这个问题,因为我无法找出我需要对名为libglib
.