摘要: from PIL import ImageFont, ImageDraw# 导入中文字体,指定字体大小font = ImageFont.truetype('SimHei.ttf', 50) OSError Traceback (most recent call last) /tmp/ipykerne 阅读全文
posted @ 2023-02-11 21:04 emanlee 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 绝对路径1、os.path 方法import osimport syscurrent_directory = os.path.dirname(os.path.abspath(__file__))print(current_directory) 2、os.path.abspath 方法import o 阅读全文
posted @ 2023-02-11 20:28 emanlee 阅读(48) 评论(0) 推荐(0) 编辑
摘要: matplotlib 中文字体测试 wget https://zihao-openmmlab.obs.cn-east-3.myhuaweicloud.com/20220716-mmclassification/dataset/SimHei.ttf # /home/software/anaconda3 阅读全文
posted @ 2023-02-11 20:24 emanlee 阅读(1503) 评论(0) 推荐(0) 编辑