sml2h3 / ddddocr

带带弟弟 通用验证码识别OCR pypi版
https://ddddocr.com
MIT License
8.96k stars 1.64k forks source link

Pillow版本更新 #128

Closed Do1e closed 10 months ago

Do1e commented 1 year ago

使用最新的Pillow 10.0.0报错:

".../ddddocr/__init__.py", line 1614, in classification
    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.LANCZOS,或修改install_requires 参考Pillow文档

QAQQL commented 1 year ago

pip install Pillow==9.2.0

marlkiller commented 11 months ago

pip3 install --force-reinstall -v "Pillow==9.5.0"