python报错“ImportError: The _imagingft C module is not installed”

windows系统
卸载pillow,重新安装

pip uninstall pillow
pip3 install pillow

加上 --no-cache-dir参数:

pip3 install pillow --no-cache-dir

Ubuntu系统
卸载同上
然后安装devel

sudo apt-get install libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel

最后重新安装。
:适用于代码中导入语句为:

from PIL import ImageFont

你可能感兴趣的:(learning,python)