无法在VS中运行Python程序代码“cmd”未被识别为

2024-06-01 13:02:13 发布

您现在位置:Python中文网/ 问答频道 /正文

我刚刚安装了Python扩展,重新启动了VS代码并对其进行了更新,但是当我尝试运行Python程序并选择调试配置为(Python文件)时,我得到以下消息:

E:\SaifWork\code\workspaces\PY\self-taught dev>cd "e:\SaifWork\code\workspaces\PY\self-taught dev" && cmd /C "set "PYTHONIOENCODING=UTF-8" && set "PYTHONUNBUFFERED=1" && C:\Users\saif\AppData\Local\Programs\Python\Python37-32\python.exe c:/Users/saif/.vscode/extensions/ms-python.python-2019.5.18678/pythonFiles/ptvsd_launcher.py --default --client --host localhost --port 50135 "e:\SaifWork\code\workspaces\PY\self-taught dev\problem1.py" "
'cmd' is not recognized as an internal or external command,
operable program or batch file.

我已经将所有python目录添加到PATH变量中。你知道吗


Tags: or代码pydevselfcmdcodeusers
1条回答
网友
1楼 · 发布于 2024-06-01 13:02:13

似乎Python目录被添加到了路径中,但是您的System32(包含命令提示符,Windows的命令行解释器)没有。请尝试手动添加它。你知道吗

编辑:System32文件夹路径是%SystemRoot%\system32,通常是C:\Windows\system32。你知道吗

相关问题 更多 >