How to fix this error on tabula.read_pdf() function in Python

Ojasvi Jain picture Ojasvi Jain · May 15, 2019 · Viewed 7.7k times · Source

I am trying to extract tables from a PDF file using Python (Pycharm).

I tried the following code:

 from tabula import wrapper
 object = wrapper.read_pdf("C:/Users/Ojasvi/Desktop/sample.pdf")

However, the error i got was:

"tabula.errors.JavaNotFoundError: `java` command is not found from this Python process. Please ensure Java is installed and PATH is set for `java`"

Answer

dome picture dome · May 17, 2019

You probably need to add java to your system path. You can check those posts, they should help you in solving your problem: