()
return ctypes.cdll.LoadLibrary(library_path)
Loads `libmujoco.so` and returns it as a `ctypes.CDLL` object.
Loads `libmujoco.so` and returns it as a `ctypes.CDLL` object.
Loads libmujoco . so and returns it as a ctypes . CDLL object .
def get_mjlib():
  """Loads `libmujoco.so` and returns it as a `ctypes.CDLL` object."""
  # Google-internal MuJoCo loading.
  try:
    # Use the MJLIB_PATH environment variable if it has been set.
    library_path = _get_full_path(os.environ[ENV_MJLIB_PATH])
  except KeyError:
    for library_path in _get_default_library_paths():
      if os.path.isfile(library_path):
        break
  if not os.path.isfile(library_path):
    raise OSError("Cannot find MuJoCo library at {}.".format(library_path))
  if platform.system() == "Linux":
    _maybe_load_linux_dynamic_deps(os.path.dirname(library_path))
  return ctypes.cdll.LoadLibrary(library_path)
def get_mjlib ( ) : # Google-internal MuJoCo loading. try : # Use the MJLIB_PATH environment variable if it has been set. library_path = _get_full_path ( os . environ [ ENV_MJLIB_PATH ] ) except KeyError : for library_path in _get_default_library_paths ( ) : if os . path . isfile ( library_path ) : break if not os . path . isfile ( library_path ) : raise OSError ( "Cannot find MuJoCo library at {}." . format ( library_path ) ) if platform . system ( ) == "Linux" : _maybe_load_linux_dynamic_deps ( os . path . dirname ( library_path ) ) return ctypes . cdll . LoadLibrary ( library_path )