且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PyCharm:进程已完成,退出代码为 0

更新时间:2022-02-07 04:07:05

这是个好消息!这意味着您的代码没有错误.你已经完成了它,它没有任何问题.Pycharm 在没有发现错误时返回 0(加上您提供的任何输出),并在遇到错误时返回 1 和错误消息.

That is good news! It means that there is no error with your code. You have run it right through and there is nothing wrong with it. Pycharm returns 0 when it has found no errors (plus any output you give it) and returns 1 as well as an error message when it encounters errors.

编辑器和脚本的行为不像交互式终端,当您运行一个函数时,它不会自动显示结果.你需要实际告诉它自己做.

Editors and scripts do not behave like the interactive terminal, when you run a function it does not automatically show the the result. You need to actually tell it to do it yourself.

通常您只需打印结果.

如果您使用 print(data.shape) 它应该返回您期望的成功消息 Process finished with exit code 0.

If you use print(data.shape) it should return what you expect with the success message Process finished with exit code 0.