本文介绍了Tabula-py-ImportError:没有名为tabula的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用Tabula-py读取pdf.我通过pip install tabula-py
I am trying to use Tabula-py to read a pdf. I installed tabula-py through pip install tabula-py
我还安装了必需的依赖项
I have also installed the required dependencies
requests
pandas
pytest
flake8
我的代码当前如下:
import tabula
import pandas as pd
df = tabula.read_pdf("report.pdf", pages=2)
print(df)
我遇到以下错误:
Traceback (most recent call last):
File "tabula_pdf_reader.py", line 1, in <module>
import tabula
ImportError: No module named tabula
我在这里想念的任何内容吗?
Any inputs to what I am missing here?
推荐答案
我在Ubuntu中也遇到了同样的问题.
I faced this same issue in Ubuntu.
首先,通过运行java --version
和javac --version
检查计算机上安装的JDK和JRE的版本.每个版本的版本都应大于7.
First, check the version of the JDK and JRE that are installed on your machine by running java --version
and javac --version
. Each should have a version greater than 7.
然后使用pip3
安装表格.
这篇关于Tabula-py-ImportError:没有名为tabula的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!