问题
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.
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?
If it helps, the folder in which MiniZinc is installed looks something like this on my computer:
回答1:
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
来源:https://stackoverflow.com/questions/51984197/unable-to-run-minizinc-from-command-line-even-after-adding-installation-locati