Mujoco: `gym.error.DependencyNotInstalled: dynamic module does not define module export function (PyInit_cymj)`

43 views Asked by At

I installed mujoco-py by doing pip install mujoco-py==1.50.1.0. It installed successfuly. However, when I try to import it using Python, I get the following error -

import mujoco_py

running build_ext
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/miniconda3/envs/deep/lib/python3.8/site-packages/mujoco_py/__init__.py", line 1, in <module>
    from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
  File "/miniconda3/envs/deep/lib/python3.8/site-packages/mujoco_py/builder.py", line 283, in <module>
    cymj = load_cython_ext(mjpro_path)
  File "/miniconda3/envs/deep/lib/python3.8/site-packages/mujoco_py/builder.py", line 55, in load_cython_ext
    mod = imp.load_dynamic("cymj", cext_so_path)
  File "/miniconda3/envs/deep/lib/python3.8/imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: dynamic module does not define module export function (PyInit_cymj)

I am running this on a HPC cluster. The surprising thing is that it seemed to have run on some nodes but is failing on the current node.

0

There are 0 answers