I have built a python script based on ocrmypdf which requires both tesseract and ghostscript to be installed locally.
This script is to be run on a laptop without administrative rights and hence I will not be able to install tesseract and ghostscript on the laptop separately.
I have attempted to use CX_Freeze to freeze up the environment and try running it on the laptop. However, I've encountered an error stating that gswin64c cannot be found on path. I've also tried to set up a temporary os.environment for ghostscript as per the following: os.environ['GS_PROG'] = r"gs10.00.0\bin"
when building the exe using cx_freeze. However, I can't seem to get it to work.
Now, I could explore uploading it to the cloud and run it off it. However, that's really the last resort as it is slow and would be expensive as I require the user to upload tons of PDF onto the cloud to analyze and extract information before returning it, and then finally downloading the extracted information again.
Any advice would be good on how I should proceed forward. Thank you!