加上双引号 如果文件路径有空格,或者文件名有空格,就为路径加上双引号,格式大致为: exe_path + " \"" + file_dirs+ "\\" + file_name + "\"" 使用repr没用,避坑 pycharm快捷键终止执行 Ctrl + F2