无法从命令行运行MiniZinc-即使在将安装位置添加到PATH之后

时间:2018-08-23 10:57:56

标签: path environment-variables command-prompt filepath minizinc

最初,我在Git CMD中运行minizinc is not recognized as an internal or external command, operable program or batch file.时遇到错误:minizinc mzn-cbc model.mzn data.mzn

后来,按照https://github.com/MiniZinc/libminizinc/issues/213上的说明和https://groups.google.com/forum/#!topic/minizinc/IFpUM_TSNGU的建议,我做了:export PATH=$PATH:{MINIZINC},其中{MINIZINC}是安装位置。但是,我的终端返回了错误:'export' is not recognized as an internal or external command, operable program or batch file.当我尝试使用Windows命令提示符运行以上命令时,也会发生这种情况。

有办法解决这个问题吗?

如果有帮助,安装MiniZinc的文件夹在我的计算机上看起来像这样:

1 个答案:

答案 0 :(得分:1)

恐怕GitHub问题中给出的指令仅适用于bash和派生的shell。默认情况下,Windows使用批处理代替。要更改PATH系统变量(在Windows中称为),您需要采取不同的步骤。它们在此处进行了解释:https://java.com/en/download/help/path.xml