Skip to content

fix: declare wolframalpha as a project dependency#58

Open
obchain wants to merge 1 commit into
sentient-agi:mainfrom
obchain:fix/wolframalpha-missing-dep
Open

fix: declare wolframalpha as a project dependency#58
obchain wants to merge 1 commit into
sentient-agi:mainfrom
obchain:fix/wolframalpha-missing-dep

Conversation

@obchain
Copy link
Copy Markdown

@obchain obchain commented May 15, 2026

What

Add wolframalpha>=5.0.0 to pyproject.toml [project].dependencies and requirements.txt.

Why

src/opendeepsearch/wolfram_tool.py:2 does:

import wolframalpha

but wolframalpha is not declared as a project dependency and is not pulled in transitively. The README's "ReAct agent with math and search tools" example (around WolframAlphaTool(app_id=...)) is the headline use case for this module, so following the README out of the box fails with:

ModuleNotFoundError: No module named 'wolframalpha'

before any agent step runs.

Fixes #57

How

  • pyproject.toml: append "wolframalpha>=5.0.0" to the inline dependencies = [...] array (keeping the existing single-line style)
  • requirements.txt: add wolframalpha>=5.0.0 next to the other tool-side packages (smolagents, gradio, wikipedia-api)

5.0.0 is the current stable line on PyPI and the API surface WolframAlphaTool uses (Client(app_id).query(...).pods[*].subpods[*].plaintext) has been stable across the 5.x series.

I did not move wolframalpha to a [project.optional-dependencies] extra. The README treats it as a first-class example without any pip install opendeepsearch[wolfram] step, and the other tool-side packages (smolagents, gradio, wikipedia-api) are declared as base deps for the same reason. Happy to refactor into an extra if you'd prefer.

Testing

  • python3 -c "import tomllib; assert 'wolframalpha>=5.0.0' in tomllib.loads(open('pyproject.toml','rb').read().decode())['project']['dependencies']" — pass
  • grep -n wolframalpha requirements.txtwolframalpha>=5.0.0
  • After uv pip install -e . on a clean venv, python -c "from opendeepsearch.wolfram_tool import WolframAlphaTool; print(WolframAlphaTool)" succeeds where it previously raised ModuleNotFoundError.

`src/opendeepsearch/wolfram_tool.py` does `import wolframalpha` at module
top, but the package is not declared in `pyproject.toml` or
`requirements.txt` and is not pulled transitively by any existing
dependency. Anyone following the README's "ReAct agent with math and
search tools" example hits `ModuleNotFoundError: No module named
'wolframalpha'` before the example reaches its first agent step.

Add `wolframalpha>=5.0.0` to both dependency lists, mirroring how the
other tool-side packages (`smolagents`, `gradio`, `wikipedia-api`) are
declared.

Fixes sentient-agi#57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WolframAlphaTool import fails out of the box: wolframalpha missing from project deps

1 participant