问题描述
最初,我在Git CMD中运行minizinc mzn-cbc model.mzn data.mzn
时遇到错误:minizinc is not recognized as an internal or external command, operable program or batch file.
.
Initially, I had the error: minizinc is not recognized as an internal or external command, operable program or batch file.
when running minizinc mzn-cbc model.mzn data.mzn
in the Git CMD.
稍后,请按照> 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命令提示符运行以上命令时,也会发生这种情况.
Later on, following the instructions found at https://github.com/MiniZinc/libminizinc/issues/213 with suggestions from https://groups.google.com/forum/#!topic/minizinc/IFpUM_TSNGU, I did: export PATH=$PATH:{MINIZINC}
where {MINIZINC}
is the installation location. However, my terminal returned the error: 'export' is not recognized as an internal or external command, operable program or batch file.
This also happens when I tried running the above with the windows command prompt..
有办法解决这个问题吗?
Is there a way to go about solving this?
如果有帮助,在我的计算机上安装MiniZinc的文件夹看起来像这样:
If it helps, the folder in which MiniZinc is installed looks something like this on my computer:
推荐答案
恐怕GitHub问题中给出的指令仅在bash和派生shell中有效.默认情况下,Windows使用批处理代替.要更改PATH系统变量(在Windows中称为),您需要采取不同的步骤.此处对它们进行了说明: https://java.com/en/download/help/path .xml
I'm afraid the instruction given in the GitHub issue only works within bash and derived shells. By default Windows uses batch instead. To change the PATH system variable, which is what it is called on Windows, you need to take different steps. They are explained here: https://java.com/en/download/help/path.xml
这篇关于无法从命令行运行MiniZinc-即使在将安装位置添加到PATH之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!