Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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`"
like image 295
Ojasvi Jain Avatar asked Oct 30 '25 02:10

Ojasvi Jain


1 Answers

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

  • How to Set Java Path On Windows?
  • Environment variables for java installation
like image 96
dome Avatar answered Oct 31 '25 16:10

dome



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!