mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-29 03:09:45 +02:00
Update error message for missing dev command
This commit is contained in:
@@ -575,6 +575,13 @@ def dev(
|
||||
try:
|
||||
from langgraph_api.cli import run_server
|
||||
except ImportError:
|
||||
py_version_msg = ""
|
||||
if sys.version_info < (3, 11):
|
||||
py_version_msg = (
|
||||
"\n\nNote: The in-mem server requires Python 3.11 or higher to be installed."
|
||||
f" You are currently using Python {sys.version_info.major}.{sys.version_info.minor}."
|
||||
' Please upgrade your Python version before installing "langgraph-cli[inmem]".'
|
||||
)
|
||||
try:
|
||||
from importlib import util
|
||||
|
||||
@@ -582,16 +589,19 @@ def dev(
|
||||
raise click.UsageError(
|
||||
"Required package 'langgraph-api' is not installed.\n"
|
||||
"Please install it with:\n\n"
|
||||
' pip install -U "langgraph-cli[inmem]"\n\n'
|
||||
' pip install -U "langgraph-cli[inmem]"'
|
||||
f"{py_version_msg}"
|
||||
) from None
|
||||
except ImportError:
|
||||
raise click.UsageError(
|
||||
"Could not verify package installation. Please ensure Python is up to date and\n"
|
||||
"langgraph-cli is installed with the 'inmem' extra: pip install -U \"langgraph-cli[inmem]\""
|
||||
f"{py_version_msg}"
|
||||
) from None
|
||||
raise click.UsageError(
|
||||
"Could not import run_server. This likely means your installation is incomplete.\n"
|
||||
"Please ensure langgraph-cli is installed with the 'inmem' extra: pip install -U \"langgraph-cli[inmem]\""
|
||||
f"{py_version_msg}"
|
||||
) from None
|
||||
|
||||
config_json = langgraph_cli.config.validate_config_file(pathlib.Path(config))
|
||||
|
||||
Reference in New Issue
Block a user