I am trying to install the solver "APOPT" in Pyomo by following the guidelines laid out below:
*Instructions for usage:
- Place apopt.py in an appropriate folder in the system path (e.g. Linux, /usr/bin/)
- Set appropriate permissions to make the script executable (e.g. chmod 775 apopt.py)
- In AMPL, Pyomo, or other NL file write, set solver option to apopt.py
- Test installation by running apopt.py -test *
I essentially copy/paste the apopt.py script from the GitHub Repository into a .py file and have placed it in my project folder that I am working in. I think that the permissions should be okay. However, when I run step 3 at the command line I get the following errors:
WARNING: Failed to create solver with name 'apopt': Failed to set executable for solver asl. File with name=apopt either does not exist or it is not executable. To skip this validation, call set_executable with validate=False.
And when I try to do Step 4 I get:
'apopt' is not recognized as an internal or external command, operable program or batch file.
I am not sure why this is happening though?
--solver=apopt.exe. If not, you can convert the .py file to an executable (e.g. using py2exe). Another thing you can try is to make sure that the apopt binary is in your administrator user's PATH variable. – Nikos Kazazakis Sep 03 '19 at 18:27