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 dev asks for the installation of inmem which is already there #2731

Open
4 tasks done
lfnovo opened this issue Dec 12, 2024 · 4 comments
Open
4 tasks done

Comments

@lfnovo
Copy link

lfnovo commented Dec 12, 2024

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

$ langgraph dev

Error Message and Stack Trace (if applicable)

Error: Required package 'langgraph-api-inmem' is not installed.
Please install it with:

    pip install -U "langgraph-cli[inmem]"

If you're developing the langgraph-cli package locally, you can install in development mode:
    pip install -e .

Description

I can't get the langgraph dev command to work. It asks me to install inmem which I already did.

System Info

System Information

OS: Darwin
OS Version: Darwin Kernel Version 24.2.0: Fri Dec 6 18:51:28 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T8112
Python Version: 3.10.6 (main, Jul 1 2024, 15:34:22) [Clang 15.0.0 (clang-1500.3.9.4)]

Package Information

langchain_core: 0.3.24
langchain: 0.3.11
langchain_community: 0.3.11
langsmith: 0.2.3
langchain_anthropic: 0.3.0
langchain_text_splitters: 0.3.2
langgraph_cli: 0.1.61
langgraph_sdk: 0.1.43

Optional packages not installed

langserve

Other Dependencies

aiohttp: 3.11.10
anthropic: 0.39.0
async-timeout: 4.0.3
click: 8.1.7
dataclasses-json: 0.6.7
defusedxml: 0.7.1
httpx: 0.27.2
httpx-sse: 0.4.0
jsonpatch: 1.33
langgraph-api: Installed. No version info available.
langsmith-pyo3: Installed. No version info available.
numpy: 1.26.4
orjson: 3.10.12
packaging: 24.2
pydantic: 2.10.3
pydantic-settings: 2.6.1
python-dotenv: 1.0.1
PyYAML: 6.0.2
requests: 2.32.3
requests-toolbelt: 1.0.0
SQLAlchemy: 2.0.36
tenacity: 9.0.0
typing-extensions: 4.12.2

@rafael-siqueira-akad
Copy link

I have the same issue :/

@hinthornw
Copy link
Contributor

hinthornw commented Dec 13, 2024

If you run with uv does it work?

curl -LsSf https://astral.sh/uv/install.sh | sh
uvx --refresh --from "langgraph-cli[inmem]" --with-editable . --python 3.11 langgraph dev

I think the issue may be one of python package managing, where you may have two installations of langgraph-cli (one in your virtual environment, one global), and when you run the CLI it might be calling the globally installed one rather than the local one

I'll try to think of how I can better work around python's packaging woes here

@Liboul
Copy link

Liboul commented Dec 26, 2024

If you run with uv does it work?

curl -LsSf https://astral.sh/uv/install.sh | sh
uvx --refresh --from "langgraph-cli[inmem]" --with-editable . --python 3.11 langgraph dev

I think the issue may be one of python package managing, where you may have two installations of langgraph-cli (one in your virtual environment, one global), and when you run the CLI it might be calling the globally installed one rather than the local one

I'll try to think of how I can better work around python's packaging woes here

Encountered the same issue, uvx command worked for me. I have neither langgraph-cli nor langgraph-api installed in the virtual environment (poetry), only globally.

Here's what also worked:

  1. Removing the globally installed cli
  2. Install latest version of langgraph-cli in the virtual env
  3. Upgrade langgraph-sdk to latest version
  4. Run langgraph dev in the virtual shell

@lucacitta
Copy link

I tried the suggested solution, but unfortunately, it didn’t work. However, I just found a way to get it working!

It seems there’s an issue with langgraph-cli[inmem] and the Python version being used. I was using Python 3.10, and when I ran pip install langgraph-cli[inmem], it didn’t install langgraph-api.

When I attempted to install langgraph-api manually, I encountered an error stating that langgraph-api requires Python > 3.11.

After upgrading to Python 3.13, I installed langgraph-cli[inmem] again, and everything started working!

I believe the root issue is that when you install langgraph-cli[inmem], it doesn’t explicitly notify you that langgraph-api failed to install due to an unmet version requirement. This can lead to confusion if you have an incompatible Python version.

Hope it helps!

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

5 participants