程序: import os os.system('ping www.baidu.com') 出现结果: 解决方法: File->Settings File Encodins 更改前: 更改后: 重新运行程序,问题解决