VS Code python troubles



我安装了VS Code,然后我安装了Python和Code Runner(根据网络上的教程(。 我启动了VS代码并输入了print("say Hello"),遇到了问题(见图片(。尽管如此,我运行代码并得到这个:

[Running] python -u "c:WindowsSystem32hellohello.py"
'python' is not recognized as an internal or external command,
operable program or batch file.

怎么了?

代码中的问题: https://i.stack.imgur.com/dPA2o.png

要么 Python 没有正确安装,要么你应该将 python 添加到 Window 的路径变量中(参见这个 S/O 问题(。这对你有帮助吗?

听起来你需要将Python添加到你的环境变量中,这样你的计算机才能识别正在运行的代码。

下面是一个简短的教程,展示了如何将 python 添加到您的环境变量中: https://appuals.com/fix-python-is-not-recognized-as-an-internal-or-external-command/

最新更新