openai / mujoco-py

MuJoCo is a physics engine for detailed, efficient rigid body simulations with contacts. mujoco-py allows using MuJoCo from Python 3.
Other
2.79k stars 810 forks source link

AttributeError: module 'mujoco_py' has no attribute 'load_model_from_path' #779

Open vitoriaob opened 8 months ago

vitoriaob commented 8 months ago

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:

My current environment is:

Is there anyone who knows how to solve this? Thanks in advance

sainavaneet commented 3 months ago

i am also having the same issue