Error loading 'pyutilib.component' entry points: 'type object 'PluginGlobals' has no attribute 'push_env
eli241 opened this issue · comments
Hi
I am trying to use OptiType and get the error:
Error loading 'pyutilib.component' entry points: 'type object 'PluginGlobals' has no attribute 'push_env''
Traceback (most recent call last):
File "OptiTypePipeline.py", line 124, in
from model import OptiType
File "/home/usr/OptiType/model.py", line 19, in
from pyomo.environ import ConcreteModel, Set, Param, Var, Binary, Objective, Constraint, ConstraintList, maximize
File "/home/python2.7/site-packages/pyomo/environ/init.py", line 14, in
from pyomo.core import *
File "/home/python2.7/site-packages/pyomo/core/init.py", line 11, in
from pyomo.util.plugin import PluginGlobals
File "/home/python2.7/site-packages/pyomo/util/init.py", line 11, in
from pyomo.util._task import pyomo_api, PyomoAPIData, PyomoAPIFactory
File "/home/python2.7/site-packages/pyomo/util/_task.py", line 21, in
import pyutilib.workflow
File "/home/python2.7/site-packages/pyutilib/workflow/init.py", line 11, in
pyutilib.component.core.PluginGlobals.push_env("pyutilib.workflow")
AttributeError: type object 'PluginGlobals' has no attribute 'push_env'
All dependencies are already installed
Thanks for the help
Eli
Hi Eli,
could you tell us which versions of the python package you are using, in particular Pyomo?
Best,
Benni
Sorry for responding so late.
I couldn't reproduce the error. I tested the specification on a new virtual Python environment but the simple test files all ran through...
Have you tried setting up a clean Python environment? If that does not work either, you could use our Docker container.
Thanks for the reply.
I managed to fix this problem but now I have a new one of "No executable found for solver 'glpk'".
Still trying to solve it if you by any chance have any idea.
Best,
Eli
This probably means that the Path to the GLPK binary has not been added to the PATH variable of your system.
Can you execute GLPK on the command line, if you type in glpsol
?
Yep. It finally works!
The problem was with the glpk version. I updated it to 4.61 and the errors stopped.
Thanks a lot