首页 > 解决方案 > vscode python没有输出

问题描述

print("hello")

无论我在 python 文件中写什么,它只给出当前文件路径。我该如何解决?

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
Gangs-MacBook-Pro:yashirq gangzhao$ /usr/bin/python3 /Users/gangzhao/yashirq/Practice/Python/Grokking_Algorithms/Binary_Search.py

在此处输入图像描述

标签: pythonvisual-studio-code

解决方案


你是如何运行文件的?您通常必须设置环境。如果您只想运行单个 python 文件并在集成终端中查看输出,请尝试右键单击编辑器,然后单击Run Python File in Terminal.


推荐阅读