IOError: cannot open resource python 2015-11-24 阅读(1535) 当我们用python的PIL库操作图片时, font = ImageFont.truetype(font_type, font_size)由于上面这句话引起的错误:IOError: cannot open resource,实际上是font_type这个字体参数无法定位,解决方式就是找到字体具体位置,绝对路径写进去,如:linux查看字体路径:fc-list :lang=zh然后将路径替换font_type即可 Tags: >python