langchain-ai/deepagents · critical · ImportError

Missing core dependency for the interpreter. Reinstall dcode

Error message

Missing core dependency for the interpreter. Reinstall dcode to restore langchain-quickjs, or relaunch with --no-interpreter to skip it.

What it means

`verify_interpreter_deps` raises `ImportError` when a core dependency required by the built-in JS interpreter (`langchain-quickjs`) is missing from the environment. The message tells the user the interpreter cannot run and offers two remedies: reinstall dcode, or relaunch with `--no-interpreter` to skip the interpreter subsystem.

Source

Thrown at libs/code/deepagents_code/extras_info.py:1480

        logger.debug("find_spec failed for langchain_quickjs", exc_info=True)
        found = False

    if not found:
        from deepagents_code.config import _is_editable_install

        if _is_editable_install():
            msg = (
                "Missing core dependency for the interpreter. Editable install "
                "detected — refresh the local environment with uv sync, or "
                "relaunch with --no-interpreter to skip it."
            )
        else:
            msg = (
                "Missing core dependency for the interpreter. "
                "Reinstall dcode to restore langchain-quickjs, or relaunch with "
                "--no-interpreter to skip it."
            )
        raise ImportError(msg)


def format_extras_status_plain(status: ExtrasStatus) -> str:
    """Render an `ExtrasStatus` mapping as column-aligned plain text.

    Suitable for stdout in non-interactive contexts (e.g. the `--version`
    CLI flag) where a markdown renderer is unavailable.

    Args:
        status: Mapping returned by `get_extras_status`.

    Returns:
        Multi-line string with a heading and one `extra  package  version`
            row per installed package.

            Returns an empty string when `status` is empty.
    """
    if not status:

View on GitHub (pinned to a1af029e6e)

Solutions

  1. Reinstall dcode so `langchain-quickjs` is restored (e.g. `pip install --force-reinstall dcode` or install with the interpreter extra)
  2. Run `pip install langchain-quickjs` directly into the active environment
  3. Relaunch with `--no-interpreter` if the JS interpreter is not needed for the session

Example fix

// before
$ dcode
ImportError: Missing core dependency for the interpreter. ...

// after
$ pip install langchain-quickjs
$ dcode   # or: dcode --no-interpreter
Defensive patterns

Strategy: try-catch

Validate before calling

import importlib.util
if importlib.util.find_spec("langchain_quickjs") is None:
    print("interpreter deps missing; reinstall dcode or use --no-interpreter")

Type guard

def interpreter_available() -> bool:
    import importlib.util
    return importlib.util.find_spec("langchain_quickjs") is not None

Try / catch

try:
    verify_interpreter_deps()
except ImportError:
    launch_args.append("--no-interpreter")  # or prompt a reinstall

Prevention

When it happens

Trigger: Launching dcode (via `_verify_interpreter_or_exit`) when `langchain-quickjs` (or a sub-dependency) is not importable — uninstalled, removed by a cleanup, broken editable install, or a mismatched/partial install.

Common situations: Installing dcode with a minimal extra set that excludes the interpreter dependency; pip resolving away the package during a dependency upgrade; virtualenv recreated without all extras; damaged site-packages after an interrupted install.

Related errors


AI-assisted analysis of langchain-ai/deepagents@a1af029e6e (2026-08-29). Data as JSON: /api/errors/a6d7724517c633b1. Report an issue: GitHub.