mujoco-py
mujoco-py copied to clipboard
AttributeError: module 'mujoco_py' has no attribute 'load_model_from_path'
I'm trying to run a very simple code using mujoco-py and dm_control suite:
import mujoco_py
from mujoco_py import utils
import dm_control
import os.path
filename = "package.xml"
path = os.path.abspath(filename)
# Load MuJoCo model
model = mujoco_py.load_model_from_path(path)
# Create a simulation environment
sim = mujoco_py.MjSim(model)
# Initialize the dm_control environment
env = suite.load(domain_name="TestOP3", task_name="OP3GRAVITY")
I cannot solve the recurrent error "module 'mujoco_py' has no attribute 'load_model_from_path'"
I saw past issues here and I tried to solve it in all possible ways but nothing has any effect. I already:
- installed gym == 0.9.1
- installed cython<3
My current environment is:
- OS: macOS Monterrey 12.6.1
- Python Version 3.11.2
- Mujoco Version 3.0.0
- mujoco-py version 2.1.2.14
- Cython version: 0.29.33
Is there anyone who knows how to solve this? Thanks in advance
i am also having the same issue
i am also having the same issue