I have recently installed Amplpy for python 3.6.5 (win 32 bit), but I am facing the following issue:
RuntimeError Traceback (most recent call last)
<ipython-input-4-1768ae85d3ec> in <module>()
1 from amplpy import AMPL
----> 2 ampl = AMPL()
D:\Poulad\Program\myprog\lib\site-packages\amplpy\ampl.py in __init__(self, environment, langext)
83 if environment is None:
84 try:
---> 85 self._impl = amplpython.AMPL()
86 except RuntimeError as e:
87 from sys import stderr
RuntimeError: AMPL could not be started: The system cannot find the file specified.
I have also added amplpy and amplpython paths to the search paths through sys.path.append() but the error is poping up again.
Would you please help me to fix the problem?
You have to put the path of the ampl executable when you call ampl (line 2). So instead of:
ampl = AMPL()
you write:
ampl = AMPL(Environment('put/here/your/path/'))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With