Open kiyros opened 2 years ago
I believe you need to --hidden-import all of ocrmypdf's built in plugins because PyInstaller doesn't understand the plugin manager.
I did try creating a PyInstaller edition of ocrmypdf before but got worried about the time to maintain another build artifact.
By ocrmypdf's "Hidden imports" do you mean ghostscript, pngquant etc?
No, I believe you need to specify --hidden-import ocrmypdf.builtin_plugins
. Something along those lines.
I don't know of any way to use PyInstaller to bundle third party dependencies like Tesseract and Ghostscript, which have their own installers and license agreements.
I also encountered the same problem use --hidden-import ocrmypdf.builtin_plugins and --copy-metadata Unable to solve the problem, the same error will still occur
For anyone finding this topic through google, the probleme has been solved here (at least for me) : https://github.com/ocrmypdf/OCRmyPDF/issues/659#issuecomment-1517712600
below is my
fileToOcr
functionThis code runs fine inside visual studio but as soon as i package using pyinstaller
pyinstaller --onefile --collect-data pikepdf --hidden-import pikepdf --copy-metadata pikepdf --collect-data ocrmypdf --hidden-import ocrmypdf --copy-metadata ocrmypdf -w 'dailyEDI_PDF_checker.py'
it gives me this error when i run the .EXE
I am not entirely sure why it is giving me 'noneType'
OS: Windows installed using: Pip Expected behavior: To run the ocr Function smoothly