Packaging Error: langgraph-checkpoint-sqlite wheel installs code under incorrect 'Langgraph' folder, causing ModuleNotFoundError #579

Closed
opened 2026-02-20 17:40:48 -05:00 by yindo · 1 comment
Owner

Originally created by @MichaelKoliopoulos on GitHub (Apr 12, 2025).

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

**Code to Reproduce**

1.  Create a fresh Conda environment (e.g., `conda create -n test-env python=3.12 -y` and `conda activate test-env`).
2.  Install the package: `pip install langgraph-checkpoint-sqlite==2.0.6`
3.  Run the following Python code:


try:
    # Attempt to import the class using the correct path for LangGraph >= 0.2.0
    from langgraph_checkpoint_sqlite.sqlite import SqliteSaver
    print("Import successful!") # This line will not be reached
except ModuleNotFoundError as e:
    print(f"Import failed: {e}")
    # Verify installation location (optional, for debugging)
    import sys
    import site
    print(f"Python Executable: {sys.executable}")
    print(f"Site Packages Paths: {site.getsitepackages()}")
    # You can also add a pip check here if desired
    # import subprocess
    # try:
    #     result = subprocess.run(['pip', 'show', 'langgraph-checkpoint-sqlite'], capture_output=True, text=True, check=True)
    #     print("\n--- pip show langgraph-checkpoint-sqlite ---")
    #     print(result.stdout)
    # except Exception as check_e:
    #     print(f"\nError running pip show: {check_e}")



**Expected Behavior**
The import should succeed without error if the package installed correctly.

**Actual Behavior**
The code fails with the error:
`Import failed: ModuleNotFoundError: No module named 'langgraph_checkpoint_sqlite'`
(Even though `pip list` shows the package is installed).

Error Message and Stack Trace (if applicable)


Description

When installing langgraph-checkpoint-sqlite (version 2.0.6, potentially others) using pip within a Conda environment on Windows, the installation reports success, but the package cannot be imported, resulting in ModuleNotFoundError: No module named 'langgraph_checkpoint_sqlite'.
Detailed Symptoms
pip install langgraph-checkpoint-sqlite completes without error messages.
pip list shows langgraph-checkpoint-sqlite installed at the correct version.
Inspecting the site-packages directory reveals that only the metadata folder (langgraph_checkpoint_sqlite-X.Y.Z.dist-info) is created. The actual package code folder (langgraph_checkpoint_sqlite) containing the necessary .py files is missing.
Running python -c "import langgraph_checkpoint_sqlite" fails with ModuleNotFoundError.
Root Cause Analysis
After extensive troubleshooting (see below), the root cause was identified by manually inspecting the wheel file downloaded from PyPI:
Downloaded langgraph_checkpoint_sqlite-2.0.6-py3-none-any.whl from https://pypi.org/project/langgraph-checkpoint-sqlite/2.0.6/#files
Renamed the .whl to .zip and extracted its contents.
Observation: The extracted archive contains the checkpointer code files, but they are incorrectly located under a folder named Langgraph. The structure found was Langgraph/checkpoint/sqlite/...
Expected Structure: The code files should be located directly under a top-level folder named langgraph_checkpoint_sqlite within the archive (e.g., langgraph_checkpoint_sqlite/checkpoint/sqlite/...).
Because the code files are not located where the package metadata (.dist-info/RECORD) expects them, pip fails to copy them into site-packages during installation, even though it successfully installs the metadata and reports success.

System Info

OS: Windows 10 (also likely affects Windows 11)
Python: 3.12 (via Miniconda/Anaconda)
Environment Manager: Conda
pip version: Latest (tried upgrading pip, setuptools, wheel)
langgraph-checkpoint-sqlite version: 2.0.6 (potentially others)
Note: This issue was reproduced even in a completely fresh Conda environment created with conda create --name test-env python=3.12.
Troubleshooting Steps Attempted (Unsuccessful)
Verifying correct Conda environment activation.
Verifying sys.path includes the correct site-packages.
Using full paths to pip.exe and python.exe.
pip install --force-reinstall --no-cache-dir.
Installing directly from the local .whl file.
Running install commands as Administrator.
Upgrading pip, setuptools, wheel.
Completely removing and recreating the Conda environment.

Originally created by @MichaelKoliopoulos on GitHub (Apr 12, 2025). ### Checked other resources - [x] This is a bug, not a usage question. For questions, please use GitHub Discussions. - [x] I added a clear and detailed title that summarizes the issue. - [x] I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example). - [x] 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 ```python **Code to Reproduce** 1. Create a fresh Conda environment (e.g., `conda create -n test-env python=3.12 -y` and `conda activate test-env`). 2. Install the package: `pip install langgraph-checkpoint-sqlite==2.0.6` 3. Run the following Python code: try: # Attempt to import the class using the correct path for LangGraph >= 0.2.0 from langgraph_checkpoint_sqlite.sqlite import SqliteSaver print("Import successful!") # This line will not be reached except ModuleNotFoundError as e: print(f"Import failed: {e}") # Verify installation location (optional, for debugging) import sys import site print(f"Python Executable: {sys.executable}") print(f"Site Packages Paths: {site.getsitepackages()}") # You can also add a pip check here if desired # import subprocess # try: # result = subprocess.run(['pip', 'show', 'langgraph-checkpoint-sqlite'], capture_output=True, text=True, check=True) # print("\n--- pip show langgraph-checkpoint-sqlite ---") # print(result.stdout) # except Exception as check_e: # print(f"\nError running pip show: {check_e}") **Expected Behavior** The import should succeed without error if the package installed correctly. **Actual Behavior** The code fails with the error: `Import failed: ModuleNotFoundError: No module named 'langgraph_checkpoint_sqlite'` (Even though `pip list` shows the package is installed). ``` ### Error Message and Stack Trace (if applicable) ```shell ``` ### Description When installing langgraph-checkpoint-sqlite (version 2.0.6, potentially others) using pip within a Conda environment on Windows, the installation reports success, but the package cannot be imported, resulting in ModuleNotFoundError: No module named 'langgraph_checkpoint_sqlite'. Detailed Symptoms pip install langgraph-checkpoint-sqlite completes without error messages. pip list shows langgraph-checkpoint-sqlite installed at the correct version. Inspecting the site-packages directory reveals that only the metadata folder (langgraph_checkpoint_sqlite-X.Y.Z.dist-info) is created. The actual package code folder (langgraph_checkpoint_sqlite) containing the necessary .py files is missing. Running python -c "import langgraph_checkpoint_sqlite" fails with ModuleNotFoundError. Root Cause Analysis After extensive troubleshooting (see below), the root cause was identified by manually inspecting the wheel file downloaded from PyPI: Downloaded langgraph_checkpoint_sqlite-2.0.6-py3-none-any.whl from https://pypi.org/project/langgraph-checkpoint-sqlite/2.0.6/#files Renamed the .whl to .zip and extracted its contents. Observation: The extracted archive contains the checkpointer code files, but they are incorrectly located under a folder named Langgraph. The structure found was Langgraph/checkpoint/sqlite/... Expected Structure: The code files should be located directly under a top-level folder named langgraph_checkpoint_sqlite within the archive (e.g., langgraph_checkpoint_sqlite/checkpoint/sqlite/...). Because the code files are not located where the package metadata (.dist-info/RECORD) expects them, pip fails to copy them into site-packages during installation, even though it successfully installs the metadata and reports success. ### System Info OS: Windows 10 (also likely affects Windows 11) Python: 3.12 (via Miniconda/Anaconda) Environment Manager: Conda pip version: Latest (tried upgrading pip, setuptools, wheel) langgraph-checkpoint-sqlite version: 2.0.6 (potentially others) Note: This issue was reproduced even in a completely fresh Conda environment created with conda create --name test-env python=3.12. Troubleshooting Steps Attempted (Unsuccessful) Verifying correct Conda environment activation. Verifying sys.path includes the correct site-packages. Using full paths to pip.exe and python.exe. pip install --force-reinstall --no-cache-dir. Installing directly from the local .whl file. Running install commands as Administrator. Upgrading pip, setuptools, wheel. Completely removing and recreating the Conda environment.
yindo closed this issue 2026-02-20 17:40:48 -05:00
Author
Owner

@vbarda commented on GitHub (Apr 12, 2025):

that's because you need to import it as from langgraph.checkpoint.sqlite import .... it's a namespace package

@vbarda commented on GitHub (Apr 12, 2025): that's because you need to import it as `from langgraph.checkpoint.sqlite import ...`. it's a namespace package
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#579