I made a python executable using pyinstaller as pyinstaller --onefile script.py
. When I run the script.exe, I get the following errors:
I am using tabula-py package to parse a pdf table. Script has no bugs though and is running pefect. Thanks!
I made a python executable using pyinstaller as pyinstaller --onefile script.py
. When I run the script.exe, I get the following errors:
I am using tabula-py package to parse a pdf table. Script has no bugs though and is running pefect. Thanks!
This problem is apparently caused because the above mentioned jar file is not added to the dist
folder structure properly.
I guess a fundamental solution would require some modifications from the side of the developers, but a possible workaround here is to use the option --add-data
option to include the jar file into a folder called tabula, so something like
pyinstaller --add-data path:\to\tabula-(...).jar; tabula
in order to make it run, or set something like
datas=[('path:\to\tabula-(...).jar', 'tabula')],
into the spec file. Made both regular builds and one-file-builds runnable for me.