Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vitoriaob opened this issue Nov 1, 2023 · 2 comments

Comments

@vitoriaob
Copy link

vitoriaob commented Nov 1, 2023

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

@sainavaneet
Copy link

i am also having the same issue

1 similar comment
@lhchank
Copy link

lhchank commented Jul 12, 2024

i am also having the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants