zylon-ai/private-gpt · error · ImportError
Tabular data dependencies are not installed. Install with `u
Error message
Tabular data dependencies are not installed. Install with `uv sync --inexact --extra tool-tabular`.
What it means
ImportError raised by _load_pandas_ai_service when private_gpt.components.tabular.pandasai_service cannot be imported. The tabular data analysis tool depends on pandas-ai and friends, shipped as the optional 'tool-tabular' extra; the loader converts the raw ImportError into an actionable install message.
Source
Thrown at private_gpt/components/tools/builders/tabular_data_builder.py:62
from private_gpt.utils.dependencies import format_missing_dependency_message
if TYPE_CHECKING:
from collections.abc import Coroutine
from private_gpt.components.tabular.pandasai_service import PandasAIService
from private_gpt.components.workflows.tabular.tabular_data import (
TabularDataAnalysisInputEvent,
TabularDataAnalysisWorkflow,
)
config = settings()
def _load_pandas_ai_service() -> type["PandasAIService"]:
try:
from private_gpt.components.tabular.pandasai_service import PandasAIService
except ImportError as e:
raise ImportError(
format_missing_dependency_message(
"Tabular data",
extras="tool-tabular",
)
) from e
return PandasAIService
def _load_tabular_workflow_dependencies() -> tuple[
type["TabularDataAnalysisInputEvent"],
type["TabularDataAnalysisWorkflow"],
]:
try:
from private_gpt.components.workflows.tabular.tabular_data import (
TabularDataAnalysisInputEvent,
TabularDataAnalysisWorkflow,
)View on GitHub (pinned to 4a030776a3)
Solutions
- Run uv sync --inexact --extra tool-tabular and retry.
- If the import still fails after install, check for version conflicts: python -c "import private_gpt.components.tabular.pandasai_service" and read the chained ImportError for the actual missing module.
- Rebuild Docker/CI images with the extra included.
Example fix
# before uv sync --inexact # after uv sync --inexact --extra tool-tabular
Defensive patterns
Strategy: type-guard
Validate before calling
def pandasai_available() -> bool:
try:
import private_gpt.components.tabular.pandasai_service # noqa: F401
return True
except ImportError:
return False Try / catch
try:
svc = _load_pandas_ai_service()
except ImportError as e:
logger.warning("tabular tool disabled: %s", e)
return [] # skip registering the tool Prevention
- Install uv sync --inexact --extra tool-tabular in every environment that enables the tabular tool.
- Probe availability before registering the tool so missing deps do not crash at runtime.
- Pin compatible versions of pandasai in the lockfile to avoid broken transitive imports.
When it happens
Trigger: Building or invoking the tabular data tool in an environment without the tool-tabular extra installed; the import of PandasAIService fails and is chained.
Common situations: Base installation used for a deployment that later enables tabular analysis; CI or Docker image built with a minimal extra set; dependency conflict causing pandasai import failure even when nominally installed.
Related errors
- Database query dependencies are not installed. Install with
- OpenAI LLM dependencies are not installed. Install with `uv
- OpenAI-like LLM dependencies are not installed. Install with
- OpenAI Responses LLM dependencies are not installed. Install
- OpenAI Responses LLM dependencies are not installed. Install
AI-assisted analysis of zylon-ai/private-gpt@4a030776a3 (2026-08-15).
Data as JSON: /api/errors/8c5dbc94c1e00941.
Report an issue: GitHub.