First time here? Check out the Help page!

Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
0

PythonPlugin with EnergyPlus v23.1 (problem with pandas)

asked 1 year ago

Hello everyone! I am trying to run a simulation with PythonPlugin within EnergyPlus. I already tried with 9.6 version of EnergyPlus and it works if you copy the required python libraries into "C:\EnergyPlusV9-6\python_standard_lib" directory. On the other hand, when moving to the latest version of EnergyPlus (v23.1 or even 22.2) the SAME worklow doesn't work. When running the co-simulation from EnergyPlus, I got the following error about pandas library.

** Severe  ** Failed to import module "PythonPlugin_file"    **   ~~~   ** Python error description follows:    
**   ~~~   ** ModuleNotFoundError("No module named 'pandas._libs.interval'")
**   ~~~   ** Python traceback follows:     **   ~~~   ** ```    **   ~~~   **  >>> Traceback (most recent call last):    **   ~~~   **  >>>   File "......\PythonPlugin_file.py", line 13, in <module>
    from other_script import*    **   ~~~   **  >>>   File "......\other_script.py", line 16, in <module>
    import pandas as pd    **   ~~~   **  >>>   File "C:\EnergyPlusV23-1-0\python_standard_lib\pandas\__init__.py", line 22, in <module>
    from pandas.compat import is_numpy_dev as _is_numpy_dev  # pyright: ignore # noqa:F401    **   ~~~   **  >>>   File "C:\EnergyPlusV23-1-0\python_standard_lib\pandas\compat\__init__.py", line 25, in <module>
    from pandas.compat.numpy import (    **   ~~~   **  >>>   File "C:\EnergyPlusV23-1-0\python_standard_lib\pandas\compat\numpy\__init__.py", line 4, in <module>
    from pandas.util.version import Version    **   ~~~   **  >>>   File "C:\EnergyPlusV23-1-0\python_standard_lib\pandas\util\__init__.py", line 2, in <module>
    from pandas.util._decorators import (  # noqa:F401    **   ~~~   **
>>>   File "C:\EnergyPlusV23-1-0\python_standard_lib\pandas\util\_decorators.py", line 14, in <module>
    from pandas._libs.properties import cache_readonly    **   ~~~   **
>>>   File "C:\EnergyPlusV23-1-0\python_standard_lib\pandas\_libs\__init__.py", line 13, in <module>
    from pandas._libs.interval import Interval    **   ~~~   **  >>> ModuleNotFoundError: No module named 'pandas._libs.interval'    **   ~~~  
** ```    **  Fatal  ** Python import error causes program termination

I tried to switch to different pandas versions but it's still giving this error. Btw I am using Spyder of Anaconda so maybe the problem would be that I'm not using Python interface. Otherwise, which do you think is the source of the error? Thank you in advance

Preview: (hide)

Comments

Have you found a solution to this?

Fady Anees's avatar Fady Anees  ( 1 year ago )

1 Answer

Sort by » oldest newest most voted
0

answered Feb 5

ClemGre's avatar

The same workflow cannot work for versions 9.6 and 22.2 because EnergyPlus uses different Python versions (3.9 for E+ 9.6 and 3.8 for 22.2).

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

Stats

Asked: 1 year ago

Seen: 797 times

Last updated: Feb 05