[英]In vscode using Python, ctrl+F5 always asks for “select environment”
I installed VSCode, downloaded official Python 3.6.4.我安装了 VSCode,下载了官方 Python 3.6.4。
VSCode detected and set the environment right - I do see "python.pythonPath" user setting set correctly. VSCode 检测到并正确设置环境 - 我确实看到“python.pythonPath”用户设置设置正确。
But, when using VS Code using Ctrl + F5 to run a Python file, I am always getting asked for "select environment" and it shows me two options - Python - Python Experimental但是,当使用Ctrl + F5使用 VS Code 运行 Python 文件时,我总是被要求“选择环境”,它向我显示了两个选项 - Python - Python 实验
What is this "Python Experimental"?这是什么“Python 实验”? How can I get rid of getting interrupted every time I try to run a script?每次尝试运行脚本时如何避免被打断?
Run > Add Configuration...
=> Choose one of the two options. Run > Add Configuration...
=> 选择两个选项之一。
After doing this it will no longer prompt you.执行此操作后,它将不再提示您。
Ctrl + F5 is a shortcut to Start without Debugging
What you want is just running a file according to your post. Ctrl + F5是Start without Debugging
的快捷方式你想要的只是根据你的帖子运行一个文件。 To run a python file in the integrated terminal, right-click your editor window and Run Python File in Terminal
.要在集成终端中运行 python 文件,请右键单击编辑器窗口并Run Python File in Terminal
。 It should open up a terminal window within VS Code and run as normal.它应该在 VS Code 中打开一个终端窗口并正常运行。 It also takes into account the environment you are currently using whenever you run it.每当您运行它时,它还会考虑您当前使用的环境。
To answer your other question about Python Experimental
, it is an option to use the experimental debugger, an alternate version of a Python Debugger.要回答有关Python Experimental
其他问题,可以选择使用实验调试器,这是 Python 调试器的替代版本。 You can read the instructions here您可以在此处阅读说明
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.