I met with the problem "Cannot invoke XXX: no such program" for all the solvers I tried.
I saw others reply saying that this is because the solver executable is not in the same path as the ampl.exe, but my problem is a little bit strange. I have checked and confirmed that all the solvers I tried did exist in the path as the ampl.exe, but it still didn't work. (as what you can see in the picture)
I am a Python user. I tried ampl in Python with the following code:
from amplpy import AMPL,Environment
ampl = AMPL(Environment('C:\\Users\\Administrator\\Desktop\\operation research\\amplide.mswin64\\amplide.mswin64'))
ampl.read('C:\\Users\\Administrator\\Desktop\\operation research\\code\\retail.mod')
ampl.readData('C:\\Users\\Administrator\\Desktop\\operation research\\code\\retail.dat')
ampl.setOption('solver','cplex')
ampl.solve()
error turned out: Cannot invoke cplex: no such program. Can any one help to see what the solution is?
Best regards,
Ken