crewAIInc/crewAI · error · ImportError
`firecrawl-py` package not found, please run `uv add firecra
Error message
`firecrawl-py` package not found, please run `uv add firecrawl-py`
What it means
Raised by FirecrawlSearchTool.__init__ when firecrawl-py is absent and the user declined the auto-install prompt. It is the deliberate abort branch: the tool refuses to construct a client without the package and names the install command to run.
Source
Thrown at lib/crewai-tools/src/crewai_tools/tools/firecrawl_search_tool/firecrawl_search_tool.py:102
self._firecrawl = FirecrawlApp(api_key=self.api_key)
except ImportError:
import click
if click.confirm(
"You are missing the 'firecrawl-py' package. Would you like to install it?"
):
import subprocess
try:
subprocess.run(["uv", "add", "firecrawl-py"], check=True) # noqa: S607
from firecrawl import FirecrawlApp
self._firecrawl = FirecrawlApp(api_key=self.api_key)
except subprocess.CalledProcessError as e:
raise ImportError("Failed to install firecrawl-py package") from e
else:
raise ImportError(
"`firecrawl-py` package not found, please run `uv add firecrawl-py`"
) from None
def _run(
self,
query: str,
) -> Any:
if not self._firecrawl:
raise RuntimeError("FirecrawlApp not properly initialized")
return self._firecrawl.search(
query=query,
**self.config,
)
try:
from firecrawl import FirecrawlApp # noqa: F401View on GitHub (pinned to 754d7323be)
Solutions
- Install the package: uv add firecrawl-py or pip install firecrawl-py.
- Declare it in project dependencies/lockfile.
- Bake it into CI images ahead of time.
Example fix
# before: prompt declined -> ImportError # after: shell # pip install firecrawl-py tool = FirecrawlSearchTool(api_key=FIRECRAWL_API_KEY)
Defensive patterns
Strategy: try-catch
Validate before calling
try:
import firecrawl # noqa: F401
except ImportError:
raise SystemExit('firecrawl-py required: pip install firecrawl-py') Try / catch
try:
tool = FirecrawlSearchTool(api_key=KEY)
except ImportError as e:
raise SystemExit('pre-install firecrawl-py (non-interactive env)') from e Prevention
- Declare firecrawl-py in requirements for all environments using this tool.
- Keep automated runs free of interactive dependency prompts.
When it happens
Trigger: Instantiating FirecrawlSearchTool without firecrawl-py and answering 'n' (or running where click.confirm cannot get a 'y').
Common situations: Non-interactive CI/CD; Docker builds; users who intentionally decline automatic dependency installation.
Related errors
- `firecrawl-py` package not found, please run `uv add firecra
- `firecrawl-py` package not found, please run `uv add firecra
- You are missing the 'exa_py' package. Please install it to u
- The 'e2b_code_interpreter' package is required for the E2B P
- Failed to install firecrawl-py package
AI-assisted analysis of crewAIInc/crewAI@754d7323be (2026-08-15).
Data as JSON: /api/errors/156cb9ed51ab83fa.
Report an issue: GitHub.