这是我尝试导入骆驼的代码:
import camelot as cl
以下是回复:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-6-360275993d18> in <module>
----> 1 import camelot as cl
2 tables = cl.read_pdf('C:\\2019.pdf', pages='47', flavor='stream')
3 tables[0].plot('text')
ModuleNotFoundError: No module named 'camelot'
这里是我检查点子列表时发生的情况。 Camelot已经安装:
Package Version
---------------- --------
camelot-py 0.8.0
chardet 3.0.4
click 7.1.2
Django 2.2.12
et-xmlfile 1.0.1
jdcal 1.4.1
numpy 1.18.5
opencv-python 4.2.0.34
openpyxl 3.0.3
pandas 1.0.4
pdfminer.six 20200517
pip 20.1.1
pycryptodome 3.9.7
PyPDF2 1.26.0
python-dateutil 2.8.1
pytz 2019.3
setuptools 41.2.0
six 1.15.0
sortedcontainers 2.2.2
sqlparse 0.3.1
尝试一下,但要使用python版本而不是2.7。
python2.7 -m pip install camelot-py
我的研究告诉我,camelot和camelot-py是“ Python软件包索引上的独立软件包”。请尝试这些并告诉我会发生什么。
$ pip uninstall camelot
$ pip uninstall camelot-py
$ pip install camelot-py[cv]