Unable to run MiniZinc from command line - Even after adding installation location to PATH

随声附和 提交于 2019-12-11 15:15:23

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!