Pyomo 4.3.11377 - ImportError: cannot import name '_VarDataWithDomain'

733 views
Skip to first unread message

stl...@gmail.com

unread,
May 6, 2016, 8:53:20 AM5/6/16
to Pyomo Forum
I use Anaconda Python 3.5.1. Tody I have updated Pyomo to 4.3.11377 and I get the following error:

Traceback (most recent call last):
  File "D:\runme.py", line 1, in <module>
    from pyomo.environ import *
  File "C:\Anaconda3\lib\site-packages\pyomo\environ\__init__.py", line 70, in <module>
    _import_packages()
  File "C:\Anaconda3\lib\site-packages\pyomo\environ\__init__.py", line 67, in _import_packages
    pkg.load()
  File "C:\Anaconda3\lib\site-packages\pyomo\core\plugins\__init__.py", line 12, in load
    import pyomo.core.plugins.transform
  File "C:\Anaconda3\lib\site-packages\pyomo\core\plugins\transform\__init__.py", line 16, in <module>
    import pyomo.core.plugins.transform.linear_dual
  File "C:\Anaconda3\lib\site-packages\pyomo\core\plugins\transform\linear_dual.py", line 27, in <module>
    from pyomo.repn.collect import collect_linear_terms
  File "C:\Anaconda3\lib\site-packages\pyomo\repn\__init__.py", line 13, in <module>
    from pyomo.repn.canonical_repn import *
  File "C:\Anaconda3\lib\site-packages\pyomo\repn\canonical_repn.py", line 31, in <module>
    from pyomo.core.base.var import _VarDataWithDomain, SimpleVar, Var, _VarData
ImportError: cannot import name '_VarDataWithDomain'

Have somebody an idea what the problem it is?

Siirola, John D

unread,
May 6, 2016, 11:00:31 AM5/6/16
to pyomo...@googlegroups.com

How did you install pyomo?  pip?  You can try:

 

                pip uninstall pyomo

                pip install pyomo --no-binary

 

and see if that fixes things.  We have had numerous reports of problems (usually with variants of Python3 and/or Anaconda), and they seem to stem from the wheel that is generated on PyPI.

 

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.
For more options, visit https://groups.google.com/d/optout.

stl...@gmail.com

unread,
May 9, 2016, 2:15:35 AM5/9/16
to Pyomo Forum
Thank you for the quick answer. I installed pyomo with pip. I tryed to install pyomo with the --no-binary options. But now stops the installation at: "Collecting PyUtilib>5.3.5 (from pyomo)". The progress it is frozen.

Thomas

stl...@gmail.com

unread,
May 9, 2016, 8:15:20 AM5/9/16
to Pyomo Forum
I solved the problem:

1. I installed PyUtilib: conda install -c https://conda.anaconda.org/conda-forge pyutilib

2. For pyomo: pip install pyomo==4.3.11328

William Hart

unread,
May 9, 2016, 8:37:29 AM5/9/16
to pyomo...@googlegroups.com

Can you confirm that you're using Windows 10?

Bill

stl...@gmail.com

unread,
May 9, 2016, 10:15:49 AM5/9/16
to Pyomo Forum
I'am using Windwos 7 64bit and  Anaconda3-4.0.0-Windows-x86_64, not Windows 10!

Bill Hart

unread,
May 13, 2016, 8:12:35 AM5/13/16
to Pyomo Forum
OK.  I just created a new release of Pyomo that looks better.

--Bill
Reply all
Reply to author
Forward
0 new messages