1

成功安装 python 和 miniconda 并导入 pandas 后尝试在 Macbook Pro OS 10.13.6 上导入 camelot。其他所有东西似乎都可以安装和工作,但是在导入 camelot 时收到错误:

import camelot
Traceback (most recent call last):
File "", line 1, in
File "/Users/apple/miniconda3/lib/python3.7/site-packages/camelot/init.py", line 6, in
from .io import read_pdf
File "/Users/apple/miniconda3/lib/python3.7/site-packages/camelot/io.py", line 5, in
from .handlers import PDFHandler
File "/Users/apple/miniconda3/lib/python3.7/site-packages/camelot/handlers.py", line 9, in
from .parsers import Stream, Lattice
File "/Users/apple/miniconda3/lib/python3.7/site-packages/camelot/parsers/init.py", line 4, in
from .lattice import Lattice
File "/Users/apple/miniconda3/lib/python3.7/site-packages/camelot/parsers/lattice.py", line 26, in
from ..image_processing import (
File "/Users/apple/miniconda3/lib/python3.7/site-packages/camelot/image_processing.py", line 3, in
import cv2
ModuleNotFoundError: No module named 'cv2'
import platform; print(platform.platform())
Darwin-17.7.0-x86_64-i386-64bit
import sys; print('Python', sys.version)
Python 3.7.6 (default, Jan 8 2020, 13:42:34)
[Clang 4.0.1 (tags/RELEASE_401/final)]
import numpy; print('NumPy', numpy.version)
NumPy 1.18.4
import cv2; print('OpenCV', cv2.version)
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'cv2'
import camelot; print('Camelot', camelot.version)

我看到我想知道的一个参数是 Darwin 参数,因为我在 Anaconda.sh 安装程序中看到,它会检查配置,如果它等于“Darwin”配置但不会安装,但 miniconda 没有那个检查。miniconda 有同样的限制吗?是否有我需要的解决方法,以便它甚至可以与 Jupiter notebook 一起使用?目前,当我将 camelot 导入 Jupiter 笔记本时,Jupiter 笔记本上发生了完全相同的 cv2 错误。我认为这些 python 工具存在于 Jupiter notebook 平台上,所以我并不需要它们全部在本地。

4

0 回答 0