I have a script that uses tabula.read_pdf. Script works fine, however when I build an exe file with PyInstaller (with --noconsole option) and run my script - it opens java.exe empty console window which stays opened untill script work is done. How can I avoid it? Thanks
Asked
Active
Viewed 513 times
2 Answers
4
I was running into a similar issue and couldn't really find the wrapper.py. After some tinkering around I found a similar workaround:
Within the directory where tabula is installed "...\Lib\site-packages\tabula" edit the "io.py" file. In the "_run" function just change the "args" variable to use "javaw" instead of "java".
I was able to hide the java console when my .exe file ran this way. I hope this helps someone in the future.

zAceX12
- 41
- 3
-
I am coming from the "Future", thanks a lot, it helped me, thank you very much – Khaled Feb 25 '23 at 19:08
-
+ If you do not want to permanently change the "io.py" file: you can change it like described in this answer, run the Pyinstaller command, and then revert back once the Pyinstaller command is done building. – Anis R. Jun 13 '23 at 20:40