1

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`"
Omkar
  • 2,747
  • 3
  • 18
  • 32
Ojasvi Jain
  • 59
  • 2
  • 5

2 Answers2

4

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

dome
  • 810
  • 6
  • 20
0

I had every thing setup Java installed and Java path setup but was still getting same error, after spending half a day , I did below and everything worked.

I was using a python environment and running Tabula in python environment. I was getting error mentioned in questions.

I changed my python environment basically default one which is no environment and everything worked. I think Tabula is not able to detect Java once we are inside an python environment.

Tokci
  • 1,000
  • 1
  • 15
  • 30