GithubHelp home page GithubHelp logo

Comments (10)

Kallinteris-Andreas avatar Kallinteris-Andreas commented on August 18, 2024 2

@hg6185 pip uninstall mujoco-py and MuJoCo environments v4 and v5 should work

from gymnasium.

pseudo-rnd-thoughts avatar pseudo-rnd-thoughts commented on August 18, 2024 1

I have an old intel MacBook so I can't test for M1
Personally, I don't think we should remove mujoco py from all

from gymnasium.

Kallinteris-Andreas avatar Kallinteris-Andreas commented on August 18, 2024

Just install the components you want pip install gymnasium[box2d, mujoco, other]

I can not really help with installing mujoco-py in ARM MACs, all I can suggest

  1. try using the X86 version
  2. use gcc9 as suggested,

from gymnasium.

hg6185 avatar hg6185 commented on August 18, 2024

Thank you for your answer.

Unfortunately is gcc9 not longer available due to upstream incompatibilities. Which is why I mapped the gcc-9 commands to GCC. However this did not lead to to success. Maybe someone else will encounter the same issue and is more advanced in this compiler stuff :D

from gymnasium.

pseudo-rnd-thoughts avatar pseudo-rnd-thoughts commented on August 18, 2024

The issue is related to mujoco-py (the v2 and v3 mujoco environments) so I would try gymnasium[mujoco] which only supports v4 and soon v5 environments

Let us know if this works so we can close the issue

from gymnasium.

Kallinteris-Andreas avatar Kallinteris-Andreas commented on August 18, 2024

@pseudo-rnd-thoughts I Believe you have an Apple laptop Have you gotten MuJoCo-py Pi to work in your computer?

Should we remove MuJoCo from pip install gymnasium[all], It seems to cause issues to users who do not intend to use old versions of MuJoCo environments?

from gymnasium.

hg6185 avatar hg6185 commented on August 18, 2024

Unfortunately, I doesn't – Maybe something else is wrong set-up in my computer. Mujoco with it's python binding works like a charm.
Today, I tried it again in a new env, but I still ran into the following problems. If I create the installation at .mujoco/mucoco210, I still get the gcc error.

from gymnasium.

pseudo-rnd-thoughts avatar pseudo-rnd-thoughts commented on August 18, 2024

@hg6185 Can you confirm is the issue only for pip install gymnasium[mujoco] or pip install gymnasium[mujoco-py]?
If it is for mujoco-py, are you certain that you need the v2 or v3 environments?

from gymnasium.

hg6185 avatar hg6185 commented on August 18, 2024

No, I cannot confirm this. The issue occurs also in v4 envs. For instance, If I run

import gymnasium as gym
gym.make("Pusher-v4") 

I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/henrikg/miniconda3/lib/python3.10/site-packages/gymnasium/envs/registration.py", line 756, in make
    env_creator = load_env_creator(env_spec.entry_point)
  File "/Users/henrikg/miniconda3/lib/python3.10/site-packages/gymnasium/envs/registration.py", line 545, in load_env_creator
    mod = importlib.import_module(mod_name)
  File "/Users/henrikg/miniconda3/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/henrikg/miniconda3/lib/python3.10/site-packages/gymnasium/envs/mujoco/__init__.py", line 1, in <module>
    from gymnasium.envs.mujoco.mujoco_env import MujocoEnv, MuJocoPyEnv  # isort:skip
  File "/Users/henrikg/miniconda3/lib/python3.10/site-packages/gymnasium/envs/mujoco/mujoco_env.py", line 13, in <module>
    import mujoco_py
  File "/Users/henrikg/miniconda3/lib/python3.10/site-packages/mujoco_py/__init__.py", line 2, in <module>
    from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
  File "/Users/henrikg/miniconda3/lib/python3.10/site-packages/mujoco_py/builder.py", line 504, in <module>
    cymj = load_cython_ext(mujoco_path)
  File "/Users/henrikg/miniconda3/lib/python3.10/site-packages/mujoco_py/builder.py", line 110, in load_cython_ext
    cext_so_path = builder.build()
  File "/Users/henrikg/miniconda3/lib/python3.10/site-packages/mujoco_py/builder.py", line 226, in build
    built_so_file_path = self._build_impl()
  File "/Users/henrikg/miniconda3/lib/python3.10/site-packages/mujoco_py/builder.py", line 333, in _build_impl
    raise RuntimeError(
RuntimeError: Could not find supported GCC executable.

HINT: On OS X, install GCC 9.x with `brew install gcc@9`. or `port install gcc9`.

The issue is related to the script that searches for the cpp compiler. However, whatever I do with the path variables, the GCC is not accepted by the mujoco simulator in .mujoco/mujoco210. Is it not possible to change this? Normal mujoco and dm_control works with my setup?

from gymnasium.

hg6185 avatar hg6185 commented on August 18, 2024

YESSSS!!!! It workssss thank you so much!

(I also downgraded to mujoco==2.3.0)
Thank you so much!

from gymnasium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.