ugr-sail / sinergym

Gym environment for building simulation and control using reinforcement learning
https://ugr-sail.github.io/sinergym/
MIT License
131 stars 35 forks source link

[Question][Help] Need help with installation #398

Closed LorenzoBianchi02 closed 7 months ago

LorenzoBianchi02 commented 7 months ago

Question ❓

Hello, I am trying to install/use sinergym and am having a bit of difficulty. I tried using docker but I only have ~15GB and I kept getting "no free space left", so I decided to try manual installation following this "https://github.com/ugr-sail/sinergym/blob/main/INSTALL.md" and this "https://alejandrocn7.github.io/sinergym/compilation/html/pages/installation.html" documentation.

I have done the following steps: $ git clone https://github.com/jajimer/sinergym.git $ cd sinergym

$ virtualenv env_sinergym --python=python3.10 $ source env_sinergym/bin/activate $ pip install -e .[extras]

$ export EPLUS_PATH=/home/neto/Desktop/sin/Energyplus-23-2-0 $ export BCVTB_PATH=/home/neto/Desktop/sin/bcvtb

$ pip install -e .

( this is my dir setup: Desktop/sin sinergym/ Energyplus-23-2-0/ bcvtb/ )

When trying to run "pytest tests/ -vv" I get the following error: ImportError while loading conftest '/home/neto/Desktop/sin/sinergym/tests/conftest.py'. tests/conftest.py:12: in from sinergym.envs.eplus_env import EplusEnv sinergym/envs/init.py:3: in from .eplus_env import EplusEnv sinergym/envs/eplus_env.py:12: in from sinergym.simulators import EnergyPlus sinergym/simulators/init.py:3: in from .eplus import EnergyPlus sinergym/simulators/eplus.py:10: in from pyenergyplus.api import EnergyPlusAPI E ModuleNotFoundError: No module named 'pyenergyplus'

Additional context

I am on ubuntu 22.04 I don' have much python experience I copied the bcvtb file from the repo because I was unable to understand how to install

Thanks in advance

AlejandroCN7 commented 7 months ago

Hello @Lorenzo69420!

The documentation about manual installation needs to be updated, I apologize. Sinergym since version 3.0.0 does not use BCVTB in its backend. Instead, it makes use of EnegyPlus Python API.

So, you should skip the BCVTB part and create the following environment variable in your operating system:

PYTHONPATH="/usr/local/EnergyPlus-23-1-0"

Note that the EnergyPlus installation path is specified, if your path is different then put yours of course. With this your interpreter should have access to that library.

I will update the documentation as soon as possible, sorry for the inconvenience again. Regards.

LorenzoBianchi02 commented 7 months ago

Thank you so much for the quick response.

Everything seems to be working perfectly fine, all the test/ passed and the examples I have tried worked. If it can help, I am using EnergyPlus version 23-2-0 and have had no particular compatibility issue, or for the matter of fact any other installation issue by following the manual installation doc. Hope this may help.

Regards.