简体   繁体   English

运行exe文件时模块easyocr中的FileNotFoundError

[英]FileNotFoundError in module easyocr when running exe file

I am trying to run exe file and scan picture with easyocr, but here's occurs the error.我正在尝试运行exe文件并使用easyocr扫描图片,但出现错误。 Could someone help me, please?有人可以帮我吗?

Traceback (most recent call last):
  File "threading.py", line 954, in _bootstrap_inner
  File "threading.py", line 892, in run
  File "ZhongDon.py", line 26, in ocr_simp
  File "easyocr\easyocr.py", line 200, in __init__
  File "easyocr\easyocr.py", line 261, in setLanguageList
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Idensas\\AppData\\Local\\Temp\\_MEI44842\\easyocr\\character\\ch_sim_char.txt'

There are also warnings, but I ignored them也有警告,但我忽略了它们

[4484] WARNING: file already exists but should not: C:\Users\Idensas\AppData\Local\Temp\_MEI44842\torch\_C.cp39-win_amd64.pyd
torch\_jit_internal.py:750: UserWarning: Unable to retrieve source for @torch.jit._overload function: <function _DenseLayer.forward at 0x0000015A402A1D30>.
  warnings.warn(f"Unable to retrieve source for @torch.jit._overload function: {func}.")
torch\_jit_internal.py:750: UserWarning: Unable to retrieve source for @torch.jit._overload function: <function _DenseLayer.forward at 0x0000015A402D8040>.
  warnings.warn(f"Unable to retrieve source for @torch.jit._overload function: {func}.")

在此处输入图像描述

This has solved my problem这解决了我的问题

pyinstaller -F ZhongDon.py --collect-all easyocr

Found the solution here这里找到了解决方案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM