{"record":{"id":"7326f26e2bf44201","repo":"crewAIInc/crewAI","slug":"this-subcommand-requires-the-full-crewai-package","errorCode":null,"errorMessage":"This subcommand requires the full crewai package.\nInstall it with: pip install crewai","messagePattern":"This subcommand requires the full crewai package\\.\nInstall it with: pip install crewai","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"lib/cli/src/crewai_cli/tools/main.py","lineNumber":46,"sourceCode":"\n\nconsole = Console()\n\n\n_REQUIRES_CREWAI_MSG = (\n    \"[red]This subcommand requires the full crewai package.\\n\"\n    \"Install it with: pip install crewai[/red]\"\n)\n\n\ndef _require_project_utils() -> Any:\n    try:\n        from crewai.utilities import project_utils\n\n        return project_utils\n    except ImportError:\n        console.print(_REQUIRES_CREWAI_MSG)\n        raise SystemExit(1) from None\n\n\ndef _require_get_user_id() -> Any:\n    try:\n        from crewai.events.listeners.tracing.utils import get_user_id\n\n        return get_user_id\n    except ImportError:\n        console.print(_REQUIRES_CREWAI_MSG)\n        raise SystemExit(1) from None\n\n\nclass ToolCommand(BaseCommand, PlusAPIMixin):\n    \"\"\"\n    A class to handle tool repository related operations for CrewAI projects.\n    \"\"\"\n\n    def __init__(self) -> None:","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/cli/src/crewai_cli/tools/main.py#L28-L64","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Install the full package into the active environment: `pip install crewai` (or `uv add crewai`).","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.","Upgrade both packages together so module paths match: `pip install -U crewai crewai-cli`.","If using UV-managed projects, run the command via `uv run crewai tool ...` so the project environment (which has crewai) is used."],"exampleFix":"# before: CLI-only environment\npip install crewai-cli\ncrewai tool publish --public  # -> SystemExit(1)\n\n# after\npip install crewai crewai-cli\ncrewai tool publish --public","handlingStrategy":"validation","validationCode":"try:\n    from crewai.utilities import project_utils  # noqa: F401\nexcept ImportError:\n    raise SystemExit(\"Install the full package first: pip install crewai\")","typeGuard":"def has_full_crewai() -> bool:\n    try:\n        import crewai.utilities.project_utils  # noqa: F401\n        return True\n    except ImportError:\n        return False","tryCatchPattern":null,"preventionTips":["Install crewai alongside crewai-cli in every environment that runs `crewai tool`","Pin crewai and crewai-cli to compatible versions in requirements","Run CLI through `uv run` inside the project so the project env is used"],"tags":["crewai","cli","packaging","import-error","dependency"],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}