jGrasp 中关于路径的错误消息 python

Error message with python in jGrasp about path

所以,我最近刚刚在我的电脑上安装了 jgrasp。我刚刚选择了标准安装。对于这个特定的实例,我正在写 python。但是,每当我尝试 运行 我的代码时,我都会收到一条错误消息,指出命令 python 未定义,并且位于错误的路径中。我已尝试在启动设置中重定向路径以及遵循 google 上有关环境变量的故障排除指南,但它仍然不起作用。

错误信息如下:

jGRASP wedge error: command "python" not found.
This command must be in the current Working directory
or on the current PATH to use this function.
working directory is "C:\Acc CS".
PATH is ";C:\Windows;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\QuickTime\QTSystem\".
jGRASP: operation complete.

如果尚未安装,则需要安装 Python。对于 Windows,您可以在这里获取:https://www.python.org/downloads/windows

您可能希望同时获得 Python 2 和 3,具体取决于您在做什么。它们在语法上有很大不同,因此如果您使用现有代码,则需要选择正确的代码。同样在 jGRASP 中,您应该在编译器设置中选择 Python 2 或 3 以获得正确的语法着色和 CSD 生成(jGRASP 中的默认值为 Python 2)。

如果您已经安装了 Python,请将包含 python.exe 的目录添加到 Windows 中的系统 PATH,或者使用 "Settings" > "PATH / CLASSPATH" > "Workspace" 在 jGRASP 中添加仅用于 jGRASP。