我刚刚安装了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变量中。
发布于 2019-06-10 08:04:58
看起来Python目录被添加到了路径中,但是你的System32 (包含Windows的命令行解释器cmd.exe )却没有,尝试手动添加它。
编辑: System32文件夹路径为%SystemRoot%\system32
,通常为C:\Windows\system32
。
https://stackoverflow.com/questions/56480444
复制相似问题