Files
msgbot/build/hooks/hook-easyocr.py
T

21 lines
632 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""PyInstaller hook: 避免 easyocr 默认 hook 触发 collect_submodules('torch') 崩溃。
PyInstaller 默认 hook-easyocr.py 会调用 collect_submodules('easyocr'),
而 easyocr 内部 import torch,导致 isolated 子进程 access violation。
本 hook 只列出 easyocr 实际需要的子模块,避开 torch 引用。
"""
hiddenimports = [
'easyocr',
'easyocr.easyocr',
'easyocr.config',
'easyocr.detection',
'easyocr.recognition',
'easyocr.utils',
'easyocr.craft',
'easyocr.craft_utils',
'easyocr.imgproc',
'easyocr.dataset',
'easyocr.model',
'easyocr.model.vgg_model',
]