问题遇到的现象和发生背景
此库不能使用,原因未知,请求解决方案!!
问题相关代码,请勿粘贴截图
import easyocr
reader = easyocr.Reader(['ch_sim','en']) # 只需要运行一次就可以将模型加载到内存中
result = reader.readtext(r'C:\Users\Win10\Desktop\实验\1111.png')
print(result)
运行结果及报错内容
Traceback (most recent call last):
File "C:\Users\Win10\PycharmProjects\untitled5\练习包\识别文字.py", line 2, in
import easyocr
File "C:\Users\Win10\AppData\Local\Programs\Python\Python39\lib\site-packages\easyocr_init_.py", line 1, in
from .easyocr import Reader
File "C:\Users\Win10\AppData\Local\Programs\Python\Python39\lib\site-packages\easyocr\easyocr.py", line 3, in
from .detection import get_detector, get_textbox
File "C:\Users\Win10\AppData\Local\Programs\Python\Python39\lib\site-packages\easyocr\detection.py", line 2, in
import torch.backends.cudnn as cudnn
ModuleNotFoundError: No module named 'torch.backends'
我的解答思路和尝试过的方法
请问是不是还需要下载一些对应的库,如果是,请说明下载那个库,如果不是请给出其他的解决方案!