Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'PIL.Image' has no attribute 'ANTIALIAS' #22

Open
759085503 opened this issue Sep 21, 2023 · 2 comments
Open

module 'PIL.Image' has no attribute 'ANTIALIAS' #22

759085503 opened this issue Sep 21, 2023 · 2 comments

Comments

@759085503
Copy link

我使用docker部署完毕后使用ocr识别,api报错为{"status": 200, "result": "", "msg": "module 'PIL.Image' has no attribute 'ANTIALIAS'"}

@759085503
Copy link
Author

请问是我哪里弄得不对吗

@yalger
Copy link

yalger commented Oct 12, 2023

Pillow的10.0.0版本移除了ANTIALIAS,现在你只能使用PIL.Image.LANCZOS或者PIL.Image.Resampling.LANCZOS
解决方法:
输入命令docker exec -it <container id> /bin/bash进入容器,然后运行pip install Pillow==9.5.0,这样将Pillow版本退回到9.5.0版本,最后输入命令docker restart <container id>重启容器就好了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants