SoFunction
Updated on 2024-11-17

settle (a dispute)pythonreport an error:AttributeError: 'ImageDraw' object has no attribute 'textbbox'

Summarize the reasons:

1, pillow is not installed or version is too low (the whole network is easy to search for solutions)

Check method: open cmd→pip list, get the following figure, check whether there is a pillow as well as check the version.

If it shows that the pillow version does not match the corresponding python version, you need to uninstall pillow and download it again.

For example, if the python version is 3.9, the corresponding pillow needs to be 8.0~8.3.1.

2, corresponding to the preparation of the environment is not installed pillow or version is too low!!!!

If after the above checks, the pillow version is correct, but the run is still showing errors, because the pillow is not installed to the corresponding authoring environment, for example, if you are using jupyter, you have to check the pillow under the jupyter environment; if you are using pycharm, you have to check the pillow under the pycharm environment.

For more information, see "Installing xx libraries in jupyter" and "Installing xx libraries in pycharm".

I am in the process of making word cloud map of the problem, so I retrieve "jupyter environment to install wordcloud and jieba library" finally solved the problem.

summarize

to this article on the solution python error: AttributeError: 'ImageDraw' object has no attribute 'textbbox' of the article is introduced to this, more related python error AttributeError content please search my previous posts or continue to browse the following relevant article I hope you will support me more in the future!