问题描述
我对 Python 真的很陌生,刚刚开始学习 Sendtex 的Python 3 基础知识"课程(链接:
如果我选择 Python,它会进入调试模式.所以,没有任何输出.
我想你可以从
如果你想添加Python路径,你可以去菜单文件→首选项→设置,然后添加Python路径,如下面:
code-runner.executorMap":{python":\"C:\\Program Files\\Python35\\python.exe\"}
I am really new to Python and just started the course "Python 3 basics by Sendtex (Link: https://www.youtube.com/channel/UCfzlCWGWYyIQ0aLC5w48gBQ)".
- I am trying to use Python with Visual Studio Code.
- The downloaded version of Python is 3.6.4.
- I have installed the Python extension in Visual Studio Code and have followed the procedure.
However, I am not able to get any output. Below is the attached screenshot.
If I select Python it enters debugging mode. So, there isn't any output.
I think you can get your answer from How to execute Python code from within Visual Studio Code.
There is a much easier way to run Python, and configuration is not needed:
- Install the Code Runner Extension
- Open the Python code file in Text Editor, and then use shortcut + + , or press and then select/type
Run Code
. The code will run and the output will be shown in the Output Window.
If you want to add the Python path, you could go to menu File → Preference → Settings, and add the Python path like below:
"code-runner.executorMap":
{
"python": "\"C:\\Program Files\\Python35\\python.exe\""
}
这篇关于Visual Studio Code 没有显示 Python 的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!