避坑指南一:
win7安装ddddocr包报错,win10正常
ImportError: DLL 1oad failed while importing, onnxruntime_pybind11_state: 参数错误。
解决方案:
联网安装pip install -r ddddocr.txt
请注意离线安装前需要在有网的电脑先下载whl包:
命令pip download pip download -d D:\packs -r 、ddddocr.txt
然后离线安装pip install --no-index --find-links=E:\whl包\ddddocr -r ddddocr.txt
dddoxr.txt下载链接【免费】ddddocr.txt资源-CSDN文库
避坑指南二:
报错 image = image.resize((int(image.size[0] * (64 / image.size[1])), 64), Image.ANTIALIAS).convert('L')
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
解决方案:将报错的代码处
image = image.resize((int(image.size[0] * (64 / image.size[1])), 64), Image.ANTIALIAS).convert('L')
修改为
image = image.resize((int(image.size[0] * (64 / image.size[1])), 64), Image.LANCZOS).convert('L')