Open zhanglexander opened 3 years ago
I have the exact same problem with my conda installation.
I tried your solution. But noticed that ModelicaRes is still using a newer version of matplotlib. I ran conda list
and saw that matplotlib-base version 3.3.1 is installed. I removed it and re-ran the setup.py of ModelicaRes.
Now I am getting
ImportError: cannot import name 'rcParams' from 'matplotlib' (unknown location)
Is there any other solution?
Edit: It now seems to work. I installed the oldest version 3.1.2 of matplotlib-base.
The downgrade to matplotlib 3.1.2 worked for me as well.
Is ModelicaRes still maintained? I feel like this is something that should be fixed sooner or later, otherwise people will not be able to use the package any more..
It looks like that this is just used to check whether an object is iterable. In this case, some alternative seems to be available as in this stackoverflow question.
For example, the following could be used:
from collections.abc import Iterable
if isinstance(e, Iterable):
# e is iterable
It looks not so difficult to implement...but is ModelicaRes still maintained?
Unfortunately it doesn't look like.. The latest commit was made 5 years ago.
After a little googling I found BuildingsPy (https://github.com/lbl-srg/BuildingsPy), which can be used (among other things) to read result files from Dymola and OpenModelica. Also, it seems to be maintained. For me it has been working so far.
There are multiple imports of
matplolib.cbook.iterable
(1, 2), however, this object is deprecated with maplotlib from version v3.1.0 (source). This has already causing import errors.An eassiest fix would be specifying matplotlib's version
<3.1.0
insetup.py
. In my casev3.0.0
worked.
use from numpy import Iterable
modify 3 py files: simres, linres, util
In my forked version I have implemented the above fix, you can then install it through pip with 'pip install git+https://github.com/sede-fa/ModelicaRes.git' There were a few other issues I came across and fixed, since I forked the latest commit which had some different code to the release.
There are multiple imports of
matplolib.cbook.iterable
(1, 2), however, this object is deprecated with maplotlib from version v3.1.0 (source). This has already causing import errors.An eassiest fix would be specifying matplotlib's version
<3.1.0
insetup.py
. In my casev3.0.0
worked.