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 FirecrawlCrawlWebsiteTool.__init__ when the 'firecrawl-py' package is missing and the user declined the interactive install prompt. It is the explicit opt-out branch: the tool will not proceed without the package, and it tells you the exact command to install it.
Source
Thrown at lib/crewai-tools/src/crewai_tools/tools/firecrawl_crawl_website_tool/firecrawl_crawl_website_tool.py:103
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, url: str) -> Any:
if not self._firecrawl:
raise RuntimeError("FirecrawlApp not properly initialized")
url = validate_url(url)
return self._firecrawl.crawl(url=url, poll_interval=2, **self.config)
try:
from firecrawl import FirecrawlApp # noqa: F401
if not getattr(FirecrawlCrawlWebsiteTool, "_model_rebuilt", False):
FirecrawlCrawlWebsiteTool.model_rebuild()
FirecrawlCrawlWebsiteTool._model_rebuilt = True # type: ignore[attr-defined]
except ImportError:View on GitHub (pinned to 754d7323be)
Solutions
- Install the package yourself: uv add firecrawl-py (or pip install firecrawl-py).
- Pre-install it in your Dockerfile/CI step so the prompt never appears.
- Pin it in pyproject.toml/requirements so all environments include it.
Example fix
# before: prompt declined -> ImportError # after: shell # pip install firecrawl-py tool = FirecrawlCrawlWebsiteTool(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 = FirecrawlCrawlWebsiteTool(api_key=KEY)
except ImportError as e:
if 'firecrawl-py' in str(e):
raise SystemExit('pre-install firecrawl-py; prompts do not work non-interactively') from e
raise Prevention
- Pre-install optional tool deps in Dockerfiles/CI steps.
- Avoid interactive install prompts in any automated environment.
When it happens
Trigger: Instantiating the tool without firecrawl-py installed and answering 'n' to the confirm prompt; non-interactive contexts where the confirm declines/aborts.
Common situations: CI/CD and Docker builds that hit the prompt without a TTY; scripted deployments where interactive confirmation is impossible; users intentionally declining auto-install out of caution.
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/30242ba7a61d3298.
Report an issue: GitHub.