Hello all,
I have an issue importing SolverFactory and SolverManagerFactory from pyomo.
[Anaconda2] C:\Users\s.pourmousavi\Anaconda\DOPF\idems>python idems_main.py
Traceback (most recent call last):
File "idems_main.py", line 14, in <module>
File "C:\Users\s.pourmousavi\Anaconda\DOPF\idems\dopf.py", line 13, in <module>
from pyomo.environ import *
File "C:\Users\s.pourmousavi\AppData\Local\Continuum\Anaconda2\lib\site-packages\pyomo\environ\__init__.py", line 14, in <module>
from pyomo.opt import SolverFactory, SolverManagerFactory, UnknownSolver
ImportError: cannot import name UnknownSolver
I have Python 2.7 through Anaconda on Windows 7. I uninstalled all pyomo packages using "pyomo_uninstall.py" and then installed Pyomo, Numpy, SciPy, and Pyomo.extras. I also can run the diet optimization problem with Pyomo and GLPK as the solver with no problem. That line of the code reads like this:
from pyomo.opt.parallel import SolverFactory, SolverManagerFactory
It is weird that although the code mentions "pyomo.opt.parallel", the output error only shows "pyomo.opt". The path is correct and pointing to the right .py file. I also tried "from pyomo.opt import SolverFactory, SolverManagerFactory", but no luck. Any suggestion?
thanks
Ali