Yes. The code you installed is for command line. It is not a python module so you don't need to import it as you are using the command line version with subprocess.Great, So simple and so effective, it works perfectly on the command line but I have a problem when doing it from a script, it tells me that the module does not exist.result :Code:
import ssocrimport subprocessresult = subprocess.check_output("ssocr -d 3 make_mono invert test.jpg", shell=True, universal_newlines=True)print ( result )
any idea ?Code:
Traceback (most recent call last): File "/home/pi/TEST-SSOCR.py", line 1, in <module> import ssocrModuleNotFoundError: No module named 'ssocr'
Take out the "import ssocr" line and it will work.
Statistics: Posted by rpdom — Sat Jul 20, 2024 10:57 am