import jieba_fast as jieba jieba.dt.tmp_dir = tmp_path jieba.load_userdict(data_path) jieba这个一定要设置,不然每次都会在tmp目录里新建文件