繁体   English   中英

无法在VS Code中运行Python程序-无法将“ cmd”识别为

[英]Can't run Python programs in VS Code - 'cmd' is not recognized as an

我刚刚安装了Python扩展,重新启动了VS Code并更新了它,但是当我尝试运行Python程序并将调试配置选择为(Python File)时,出现以下消息:

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变量中。

似乎Python目录已添加到PATH,但您的System32(包含Windows的命令行解释器cmd.exe)没有。 尝试手动添加。

编辑:System32文件夹路径是%SystemRoot%\\system32 ,通常是C:\\Windows\\system32

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM