Mujoco-py: Error when installing Mujoco-py - RuntimeError: Could not find GCC executable.

Created on 11 Jan 2021  Â·  2Comments  Â·  Source: openai/mujoco-py

When I use pip3 install -U 'mujoco-py<2.1,>=2.0' to install mujoco-py I get this error message:
RuntimeError: Could not find GCC executable.

HINT: On OS X, install GCC with brew install gcc. or port install gcc.


ERROR: Failed building wheel for mujoco-py
Failed to build mujoco-py
ERROR: Could not build wheels for mujoco-py which use PEP 517 and cannot be installed directly

I have tried using both brew install gcc. or port install gcc and I get command not found: brew and the same for port

  • OS: [macOS 11.0.1]
  • Python Version [3.8]
  • Mujoco Version [200]
  • mujoco-py version [2.0.2.5]

Most helpful comment

brew install gcc@7
pip uninstall mujoco_py
pip install mujoco_py

Worked for me. Don't know if this is correct, but this gave a few warnings and worked as expected. Maybe this occurred due to some bug in gcc and gets fixed later.

All 2 comments

Same problem, but this pip install mujoco-py==2.0.2.8 worked. However, when I import the library, it throws the same error. Don't know how to fix that.

brew install gcc@7
pip uninstall mujoco_py
pip install mujoco_py

Worked for me. Don't know if this is correct, but this gave a few warnings and worked as expected. Maybe this occurred due to some bug in gcc and gets fixed later.

Was this page helpful?
0 / 5 - 0 ratings