Output shown in Jupyter Notebook but not in PyCharm

前端 未结 1 526
一整个雨季
一整个雨季 2021-01-15 14:06

I\'ve seen similar posts but haven\'t seen any reply that really addresses the difference in outputs between Jupyter Notebook and PyCharm.

An example is like this:

相关标签:
1条回答
  • 2021-01-15 14:44

    The reason is because Pycharm is running in script mode, while Jupyter is working in interactive mode. You can add print statements such as print(now) to see the output, or you can run the code in the Pycharm interactive interpreter.

    See this for more details on interactive mode Python interpretation difference in interactive mode and script mode

    See this for more details on how to use the Pycharm interactive interpreter Does Pycharm have Interactive Python Interpreter?

    0 讨论(0)
提交回复
热议问题