Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

langgraph_prebuilt is not available when installing. #3866

Closed
4 tasks done
shivsant opened this issue Mar 16, 2025 · 2 comments
Closed
4 tasks done

langgraph_prebuilt is not available when installing. #3866

shivsant opened this issue Mar 16, 2025 · 2 comments

Comments

@shivsant
Copy link

Checked other resources

  • This is a bug, not a usage question. For questions, please use GitHub Discussions.
  • I added a clear and detailed title that summarizes the issue.
  • I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
  • I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue.

Example Code

from langgraph.prebuilt import create_react_agent

Error Message and Stack Trace (if applicable)

Error : 
   from langgraph.prebuilt import create_react_agent
ModuleNotFoundError: No module named 'langgraph.prebuilt'

==========================================================================
When I check the venv, I don't see langgraph_prebuilt module in the venv dir - this is also mentioned in pypy.

> ls venv/lib/python3.11/site-packages/langgraph*
venv/lib/python3.11/site-packages/langgraph:
__pycache__  channels    config.py     errors.py  graph    pregel    store     utils
_api         checkpoint  constants.py  func       managed  py.typed  types.py  version.py

venv/lib/python3.11/site-packages/langgraph-0.3.11.dist-info:
INSTALLER  LICENSE  METADATA  RECORD  WHEEL

venv/lib/python3.11/site-packages/langgraph_checkpoint-2.0.16.dist-info:
INSTALLER  LICENSE  METADATA  RECORD  REQUESTED  WHEEL

venv/lib/python3.11/site-packages/langgraph_prebuilt-0.1.3.dist-info:
INSTALLER  LICENSE  METADATA  RECORD  WHEEL

venv/lib/python3.11/site-packages/langgraph_sdk:
__init__.py  __pycache__  auth  client.py  py.typed  schema.py  sse.py

venv/lib/python3.11/site-packages/langgraph_sdk-0.1.53.dist-info:
INSTALLER  LICENSE  METADATA  RECORD  REQUESTED  WHEEL

venv/lib/python3.11/site-packages/langgraph_supervisor:
__init__.py  __pycache__  agent_name.py  handoff.py  supervisor.py

venv/lib/python3.11/site-packages/langgraph_supervisor-0.0.9.dist-info:
INSTALLER  METADATA  RECORD  REQUESTED  WHEEL  entry_points.txt  licenses

Description

I am trying to import langgraph.prebuilt to use create_react_agent

I am able to do in langgraph 0.2.76 but not with anything in 0.3.* onwards

I see in pypy for https://pypi.org/project/langgraph/0.3.0/

Reason this release was yanked:

Missing dependency on langgraph-prebuilt

I think this is still not fixed - please look at it.

System Info

python -m langchain_core.sys_info

System Information

OS: Linux
OS Version: #1 SMP Tue Mar 12 13:01:34 UTC 2024 (b92bd5a/lp-b8e09a6)
Python Version: 3.11.1 (main, Dec 6 2023, 09:00:14) [GCC 12.2.0]

Package Information

langchain_core: 0.3.41
langchain: 0.3.20
langchain_community: 0.3.19
langsmith: 0.1.147
langchain_openai: 0.3.7
langchain_postgres: 0.0.12
langchain_text_splitters: 0.3.6
langgraph_sdk: 0.1.53
langgraph_supervisor: 0.0.9

Optional packages not installed

langserve

Other Dependencies

aiohttp<4.0.0,>=3.8.3: Installed. No version info available.
async-timeout<5.0.0,>=4.0.0;: Installed. No version info available.
dataclasses-json<0.7,>=0.5.7: Installed. No version info available.
httpx: 0.27.0
httpx-sse<1.0.0,>=0.4.0: Installed. No version info available.
jsonpatch<2.0,>=1.33: Installed. No version info available.
langchain-anthropic;: Installed. No version info available.
langchain-aws;: Installed. No version info available.
langchain-cohere;: Installed. No version info available.
langchain-community;: Installed. No version info available.
langchain-core<1.0.0,>=0.3.34: Installed. No version info available.
langchain-core<1.0.0,>=0.3.39: Installed. No version info available.
langchain-core<1.0.0,>=0.3.41: Installed. No version info available.
langchain-deepseek;: Installed. No version info available.
langchain-fireworks;: Installed. No version info available.
langchain-google-genai;: Installed. No version info available.
langchain-google-vertexai;: Installed. No version info available.
langchain-groq;: Installed. No version info available.
langchain-huggingface;: Installed. No version info available.
langchain-mistralai;: Installed. No version info available.
langchain-ollama;: Installed. No version info available.
langchain-openai;: Installed. No version info available.
langchain-text-splitters<1.0.0,>=0.3.6: Installed. No version info available.
langchain-together;: Installed. No version info available.
langchain-xai;: Installed. No version info available.
langchain<1.0.0,>=0.3.20: Installed. No version info available.
langgraph-prebuilt<0.2.0,>=0.1.2: Installed. No version info available.
langgraph<0.4.0,>=0.3.5: Installed. No version info available.
langsmith-pyo3: Installed. No version info available.
langsmith<0.4,>=0.1.125: Installed. No version info available.
langsmith<0.4,>=0.1.17: Installed. No version info available.
numpy: 1.26.4
numpy<3,>=1.26.2: Installed. No version info available.
openai<2.0.0,>=1.58.1: Installed. No version info available.
orjson: 3.10.4
packaging<25,>=23.2: Installed. No version info available.
pgvector: 0.2.5
psycopg: 3.1.19
psycopg-pool: 3.2.2
pydantic: 2.8.2
pydantic-settings<3.0.0,>=2.4.0: Installed. No version info available.
pydantic<3.0.0,>=2.5.2;: Installed. No version info available.
pydantic<3.0.0,>=2.7.4: Installed. No version info available.
pydantic<3.0.0,>=2.7.4;: Installed. No version info available.
PyYAML>=5.3: Installed. No version info available.
requests: 2.32.3
requests-toolbelt: 1.0.0
requests<3,>=2: Installed. No version info available.
sqlalchemy: 2.0.34
SQLAlchemy<3,>=1.4: Installed. No version info available.
tenacity!=8.4.0,<10,>=8.1.0: Installed. No version info available.
tenacity!=8.4.0,<10.0.0,>=8.1.0: Installed. No version info available.
tiktoken<1,>=0.7: Installed. No version info available.
typing-extensions>=4.7: Installed. No version info available.

@willy20040711
Copy link

I have the same problem which langgraph 0.3.11. (python version 3.13 and 3.12 both)

@vbarda
Copy link
Collaborator

vbarda commented Mar 16, 2025

Please reinstall langgraph in a fresh virtualenv. langgraph-prebuilt is now a separate library (bundled w/ langgraph by default). See more here https://github.com/langchain-ai/langgraph/releases/0.3.1

@vbarda vbarda closed this as completed Mar 16, 2025
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

No branches or pull requests

3 participants