pyomo.environ failed to import pyomo.opt.plugins

477 views
Skip to first unread message

Osvaldo Illescas

unread,
Nov 18, 2020, 2:40:39 PM11/18/20
to Pyomo Forum
Well, that's the error I'm getting. Upgrading Spyder and Pyomo didn't solved it.

Here's complete traceback;

Original ImportError: pyutilib.enum has been removed.

Python 3 now has an enum implementation in the standard library (also
available for older Python versions as the third-party enum34 PyPI
package) that supersedes this library.
Traceback:
  File "C:\Users\Osvaldo\Anaconda3\lib\site-packages\pyomo\environ\__init__.py", line 69, in _import_packages
    _do_import(pname)
  File "C:\Users\Osvaldo\Anaconda3\lib\site-packages\pyomo\environ\__init__.py", line 16, in _do_import
    importlib.import_module(pkg_name)
  File "C:\Users\Osvaldo\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\Osvaldo\Anaconda3\lib\site-packages\pyomo\opt\__init__.py", line 11, in <module>
    from pyomo.opt.base import *
  File "C:\Users\Osvaldo\Anaconda3\lib\site-packages\pyomo\opt\base\__init__.py", line 14, in <module>
    from pyomo.opt.base.convert import *
  File "C:\Users\Osvaldo\Anaconda3\lib\site-packages\pyomo\opt\base\convert.py", line 16, in <module>
    from pyomo.opt.base.formats import guess_format
  File "C:\Users\Osvaldo\Anaconda3\lib\site-packages\pyomo\opt\base\formats.py", line 16, in <module>
    from pyutilib.enum import Enum
  File "C:\Users\Osvaldo\Anaconda3\lib\site-packages\pyutilib\enum\__init__.py", line 18, in <module>
    package) that supersedes this library.""")

Siirola, John D

unread,
Nov 18, 2020, 3:37:49 PM11/18/20
to pyomo...@googlegroups.com

This looks like a mismatch between Pyomo and PyUtilib, where you have PyUtilib 6.0, but Pyomo < 5.7.  Either upgrade you Pyomo to 5.7 (or 5.7.1) or downgrade PyUtilib to 5.8.

 

John

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyomo-forum/4847a157-3e09-4543-8c15-3d6734f19ef1n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages