safetyembedded / SafetyEmbeddedMDP

2 stars 1 forks source link

Resolving Dependencies; safety_gym and mujoco_py version #2

Open HarshithaBR opened 3 months ago

HarshithaBR commented 3 months ago

Hi,

We are trying to run the code and reproduce the results. We are building upon this conda environment.

There are couple of errors that we are facing.

  1. safety_gym is not a known module. Tried resolving this using: pip install git+https://github.com/openai/safety-gym.git This requires mujoco_py version mujoco-py==2.0.2.7
  2. pip install mujoco_py==2.0.2.7 The wheel files for this version cannot be built: ERROR: Failed building wheel for mujoco_py Failed to build mujoco_py ERROR: Could not build wheels for mujoco_py, which is required to install pyproject.toml-based projects

Steps to reproduce this error:

conda create -n <env_name> env -f=<env_file_path>
conda activate <env_name>
python3 main_lower_level_agent.py --agent=AGENT --seed=0
followed by the pip install commands used above.

Can you please give your suggestion on how we can proceed with resolving these errors, with respect to mujoco_py.

Thanks and best regards

fanyangr commented 3 months ago

Hi,

This is very likely to be related to the MuJoCo installation. Might be worth checking this page: https://www.cs.cmu.edu/~cga/controls-intro-22/kantor/How_to_Install_MuJoCo_on_Ubuntu_V1.pdf Generally, to install mujoco_py (the old version before Deepmind), you will need to install MuJoCo first. The installation of MuJoCo cannot be handled through pip or conda, but you will need to manually download the source file, and you will need to put a license file in the corresponding directory. After successfully installing the MuJoCo, you should be able to install mujoco_py. Let me know if this solve the issue.

HarshithaBR commented 3 months ago

Thank you for your reply.

I will proceed as you have suggested.