crewAIInc/crewAI · error · SystemExit

This subcommand requires the full crewai package. Install…

Error message

This subcommand requires the full crewai package.
Install it with: pip install crewai

What it means

Printed and accompanied by SystemExit(1) by _require_project_utils() in crewai_cli/tools/main.py when `from crewai.utilities import project_utils` raises ImportError. The crewai CLI package (crewai-cli) can be installed standalone; tool publish/discovery subcommands depend on utilities that only exist in the full crewai package, so the CLI refuses to continue and tells you to install crewai.

Solutions

  1. Install the full package into the active environment: `pip install crewai` (or `uv add crewai`).
  2. Verify which environment you are in: `pip show crewai` / `uv pip list` — the shell may be pointing at a different interpreter than the one running crewai.
  3. Upgrade both packages together so module paths match: `pip install -U crewai crewai-cli`.
  4. If using UV-managed projects, run the command via `uv run crewai tool ...` so the project environment (which has crewai) is used.

Example fix

# before: CLI-only environment
pip install crewai-cli
crewai tool publish --public  # -> SystemExit(1)

# after
pip install crewai crewai-cli
crewai tool publish --public
Defensive patterns

Strategy: validation

Validate before calling

try:
    from crewai.utilities import project_utils  # noqa: F401
except ImportError:
    raise SystemExit("Install the full package first: pip install crewai")

Type guard

def has_full_crewai() -> bool:
    try:
        import crewai.utilities.project_utils  # noqa: F401
        return True
    except ImportError:
        return False

Prevention

When it happens

Trigger: Running `crewai tool publish` or `crewai tool create` in an environment where only crewai-cli (or crewai[tools] partial) is installed — e.g. a lightweight CI container or a venv where the CLI was installed alone via pip install crewai-cli.

Common situations: CI pipelines installing just the CLI; stale virtual environments from before crewai/crewai-cli packaging split; a project that depends on an old crewai version whose module path (crewai.utilities.project_utils) does not exist yet.

Related errors


AI-assisted analysis of crewAIInc/crewAI@754d7323be (2026-08-15). Data as JSON: /api/errors/7326f26e2bf44201. Report an issue: GitHub.

Appendix: source

Thrown at lib/cli/src/crewai_cli/tools/main.py:46


console = Console()


_REQUIRES_CREWAI_MSG = (
    "[red]This subcommand requires the full crewai package.\n"
    "Install it with: pip install crewai[/red]"
)


def _require_project_utils() -> Any:
    try:
        from crewai.utilities import project_utils

        return project_utils
    except ImportError:
        console.print(_REQUIRES_CREWAI_MSG)
        raise SystemExit(1) from None


def _require_get_user_id() -> Any:
    try:
        from crewai.events.listeners.tracing.utils import get_user_id

        return get_user_id
    except ImportError:
        console.print(_REQUIRES_CREWAI_MSG)
        raise SystemExit(1) from None


class ToolCommand(BaseCommand, PlusAPIMixin):
    """
    A class to handle tool repository related operations for CrewAI projects.
    """

    def __init__(self) -> None:

View on GitHub (pinned to 754d7323be)