python问题解决:在终端上运行报错:cls: command not found

问题:在py文件中使用了 os.system("cls") 运行时报错

解决方法:

1.将os.system("cls")改为os.system("clear")

2.在preference —Build,Execution,Deployment—console—python console

在环境变量中添加  TERM=xterm-color

python问题解决:在终端上运行报错:cls: command not found

3.在配置文件里勾选emulate terminal in out

python问题解决:在终端上运行报错:cls: command not found

解决完成。