question
AttributeError: 'ImageDraw' object has no attribute 'textsize'
solution
1. You can use pip to install Pillow
2. Check your Pillow version.
The command line is shown below
python
>> pip install PIL
>> print(PIL.__version__)
If it's 10.0, then that's the problem. The solution is to downgrade your copy:
pip install Pillow==9.5.0
If it's earlier than 10.0, there may be other issues.
If changing from 10.0 to 9.5 still doesn't work, try a version again, for example, 9.4.0.
pip install Pillow==9.4.0