Unity-Technologies/ml-agents · error · NotImplementedError

No extensions found for this platform.

Error message

No extensions found for this platform.

What it means

NotImplementedError raised by get_local_binary_path_if_exists when the current platform string has no known binary-extension mapping. Known platforms: linux -> *.x86_64, darwin -> *.app, win32 -> *.exe.

Source

Thrown at ml-agents-envs/mlagents_envs/registry/binary_utils.py:89

    """
    Recursively searches for a Unity executable in the extracted files folders. This is
    platform dependent : It will only return a Unity executable compatible with the
    computer's OS. If no executable is found, None will be returned.
    :param name: The name/identifier of the executable
    :param url: The url the executable was downloaded from (for verification)
    :param: tmp_dir: Optional override for the temporary directory to save binaries and zips in.
    """
    _, bin_dir = get_tmp_dirs(tmp_dir)
    extension = None

    if platform == "linux" or platform == "linux2":
        extension = "*.x86_64"
    if platform == "darwin":
        extension = "*.app"
    if platform == "win32":
        extension = "*.exe"
    if extension is None:
        raise NotImplementedError("No extensions found for this platform.")
    url_hash = "-" + hashlib.md5(url.encode()).hexdigest()
    path = os.path.join(bin_dir, name + url_hash, "**", extension)
    candidates = glob.glob(path, recursive=True)
    if len(candidates) == 0:
        return None
    else:
        for c in candidates:
            # Unity sometimes produces another .exe file that we must filter out
            if "UnityCrashHandler64" not in c:
                # If the file is not valid, return None and delete faulty directory
                if validate_environment_path(c) is None:
                    shutil.rmtree(c)
                    return None
                return c
        return None


def _get_tmp_dir_helper(tmp_dir: Optional[str] = None) -> Tuple[str, str]:

View on GitHub (pinned to 3ecb446f75)

Solutions

  1. Run on a supported platform (linux x86_64, macOS, Windows).
  2. Extend binary_utils to map your platform to an extension (patch the if-chain) and rebuild/install locally.
  3. Force a known platform value if your runtime's sys.platform is nonstandard but the OS is actually supported.
  4. Avoid remote registry entries on the unsupported platform; provide the executable path manually via UnityEnvironment(file_name=...).

Example fix

// before
if platform == "linux":
    extension = "*.x86_64"
// after
if platform == "linux":
    extension = "*.x86_64"
elif platform.startswith("linux"):
    extension = "*.x86_64"  # cover linux-aarch64 etc.
Defensive patterns

Strategy: validation

Validate before calling

import sys
SUPPORTED = {"linux", "darwin", "win32"}
if sys.platform not in SUPPORTED:
    raise RuntimeError(f"Binary registry unsupported on {sys.platform}")
entry.make()

Type guard

def is_supported_platform(platform: str) -> bool:
    return platform in {"linux", "darwin", "win32"}

Try / catch

try:
    env = entry.make()
except NotImplementedError:
    env = UnityEnvironment(file_name=manual_binary_path)

Prevention

When it happens

Trigger: Calling get_local_binary_path (via a remote registry entry's make()) on a platform other than linux/darwin/win32 — e.g. arm64-specific strings, freebsd, or a nonstandard sys.platform value.

Common situations: Running ML-Agents binary downloads on unsupported OS/arch (Apple Silicon where platform reports differently, Windows ARM, BSD); embedding the library in a tool that fakes sys.platform.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of Unity-Technologies/ml-agents@3ecb446f75 (2026-09-02). Data as JSON: /api/errors/e04a3948cb6eb27b. Report an issue: GitHub.