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.88k stars 813 forks source link

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

Open vitoriaob opened 1 year ago

vitoriaob commented 1 year 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 7 months ago

i am also having the same issue

lhchank commented 4 months ago

i am also having the same issue