File "C:\Users\WarmDay\AppData\Local\Programs\Python\Python36\lib\site-packages\PIL\ImageFont.py", line 188, in __init__
    font, size, index, encoding, layout_engine=layout_engine
OSError: cannot open resource

我的平台是window10
解决思路:1.找到本地字体 路径为:C:\Windows\Fonts
在这里插入图片描述
2.选择我们想要改为的字体,以宋体为例:
在这里插入图片描述
3.修改font_path=’./simsun.ttc

Logo

昇腾计算产业是基于昇腾系列(HUAWEI Ascend)处理器和基础软件构建的全栈 AI计算基础设施、行业应用及服务,https://devpress.csdn.net/organization/setting/general/146749包括昇腾系列处理器、系列硬件、CANN、AI计算框架、应用使能、开发工具链、管理运维工具、行业应用及服务等全产业链

更多推荐