简体   繁体   中英

Problems with _imagingft at Pillow library with mac

I'm using Pillow library to create an image composed of different Strings but when I use "ImageFont.truetype("sans-serif.ttf", 16)" this line give me this exception:

raise ImportError("The _imagingft C module is not installed")
ImportError: The _imagingft C module is not installed

This exception it appears only when I execute the code in MAC, when I use Windows/Linux the execution goes well. How can I make it work in MAC?

brew install freetype
pip uninstall Pillow
pip install Pillow

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM