10 2021 档案
摘要:方法 下载中文字体 ,比如SimHei.ttf 下载完的字体拷贝到matplotlib相应目录 修改 matplotlibrc文件 找到缓存目录,删除缓存,不然始终没法生效!!! 缓存目录位置查看: from matplotlib import get_cachedir print(get_cach
阅读全文
摘要:This is due to one of Duckling's dependency JPype. If you dive into the code, you'll see that when starting the JVM using JPype, an argument "convertS
阅读全文
摘要:问题 vscode中terminal 显示的python版本(python2.7.x)与cmd窗口python版本(python3.7.x)不一致 解决 打开setting.json文件 搜索“terminal.integrated.env.osx” 编辑"settings.json"文件,添加:
阅读全文
摘要:问题 用法 配合递归使用,遍历树形结构比较方便 E.g: def parse(tree): global count count += 1 for subtree in tree: label = subtree.label() if label == 'OrderBy': print(f"###:
阅读全文
摘要:问题 字典中包含非字典的子对象的序列化 方式1 使用default参数,default=lambda obj: obj.__dict__(), 保证其中包含的非字典对象的类有方法__dict__ class ID(object): def __init__(self, id) -> None: se
阅读全文
摘要:常用命令 env conda env list # 查看虚拟环境 conda create -n python2 python=2.7 anaconda ## 创建虚拟环境 常见问题 conda: command not found ~/.bashrc 添加环境变量 export PATH=$PAT
阅读全文