-
how to make exe from python file with paddleOCRi am using auto-py-to-exe but i think it will work in pyinstaller too with the same parameters to collect data. install auto-py-to-exefor installing auto-py-to-exe github page: https://github.com/brentvollebregt/auto-py-to-exe select you main file .py and add the paddle dependencies in the Advanced optionsit take me a while to discover this. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 63 replies
-
In my case, script return "ModuleNotFoundError: No module named 'scipy.io'", but other problems gone - your solution fix it. |
Beta Was this translation helpful? Give feedback.
-
I still find an error after using your method, maybe I should add more file? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Thank you @Heryk13. You solution worked perfectly for me for Python 3.11. Thanks a lot again. |
Beta Was this translation helpful? Give feedback.
-
Thank you, your solution solved my problem. |
Beta Was this translation helpful? Give feedback.
-
Thank you, this method also solved my problem |
Beta Was this translation helpful? Give feedback.
-
![]() |
Beta Was this translation helpful? Give feedback.
hey @Edmond-Lee-Zse-Wong i created a exe with your code. here is what i used
code:
`import traceback
import time
try:
from paddleocr import PaddleOCR
ocr = PaddleOCR(use_angle_cls=True, lang="ch") # need to run only once to download and load model into memory
img_path = "img.png"
result = ocr.ocr(img_path, cls=True)
for idx in range(len(result)):
res = result[idx]
for line in res:
print(f"ocrText: {line[1][0]}")
except Exception as e:
traceback.print_exc()
time.sleep(60)
`
i tested in the python versions 3.10.13 and i saw the error scipy, and did what @pikut said.
like this.
and it worked i think you could try in the python version 3.10.13 or 3.9.13 and 3.10.11 that worked for @pikut too.
…