创建文件时,目录含中文,报 No such file or directory,各种编码字符转化都没有用 在创建文件前加一段,先创建目录,就可以了 os.makedirs(os.path.split( p )[0])