Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pyright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
python-version: '3.12'
- run: pip install uv
- run: uv pip install --system -e .[amber,ase,pymatgen] 'rdkit<2025.3.3' openbabel-wheel
- run: uv pip install --system -e .[amber,ase,pymatgen] rdkit openbabel-wheel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

rdkit 2025.3.3 numpy compatibility issues

💡 Result:

Short answer: RDKit 2025.03.3 (and nearby 2025.x releases) can break with NumPy 2.x because its compiled Python extensions (and some downstream dependencies) must be built against the NumPy‑2 ABI; if they were built against NumPy‑1.x they will fail at import. See the upstream discussion and Debian build failures. [1][2][3]

What that means and options

  • Cause: NumPy 2.0 is an ABI‑breaking release; wheels built with NumPy 1.x won’t run with NumPy 2.x unless rebuilt against NumPy 2.0. RDKit/its binary wheels or dependencies may still be built against NumPy‑1.x. [2][4]
  • Evidence: RDKit GitHub issue tracking NumPy‑2 support (opened May 31, 2024) and Debian FTBFS report for NumPy‑2 (Jan 30, 2025). [2][3]
  • Quick workarounds:
    1. Use numpy<2 (pip/conda): pip install "numpy<2" (or conda install numpy<2) to restore compatibility immediately. [3][4]
    2. Install an RDKit build/wheel explicitly built against NumPy‑2 (if/when available) or rebuild RDKit from source in an environment with NumPy‑2 installed so extensions are compiled against NumPy‑2. The NumPy docs explain that wheels built with NumPy‑2.0 will work for 1.xx as well. [4][1]
    3. Use conda-forge/conda packages if those builders have published NumPy‑2‑compatible RDKit wheels (check the package build notes). [1]
  • Diagnostic error you may see: “A module that was compiled using NumPy 1.x cannot be run in NumPy 2.x …” — that’s the signature of this ABI mismatch. [3]

If you want, tell me:

  • how you installed RDKit (pip, conda, system package), and
  • your Python and numpy versions (python -V; python -c "import numpy as np; print(np.version)")
    and I’ll give exact commands to fix or rebuild for your setup.

Sources
[1] RDKit install docs (2025.03.x).
[2] RDKit GitHub issue “Support NumPy 2.0” (opened May 31, 2024).
[3] Debian/Debichem report: rdkit FTBFS with numpy 2.x (Jan 30, 2025).
[4] NumPy guidance on supporting NumPy 2.0 (build-time ABI notes).


🏁 Script executed:

# Search for context about the rdkit version pin in git history
cd /tmp && git -C . 2>/dev/null || echo "no git context available"
# Try to find any references to rdkit version constraints or issues in the codebase
rg "rdkit" --type py --type yml -A 2 -B 2 | head -50

Repository: deepmodeling/dpdata

Length of output: 2293


🏁 Script executed:

# Search for rdkit references in the codebase
rg "rdkit" -t python -t yaml --type-list | head -20

# Specifically look for pyright workflow and rdkit references
cat .github/workflows/pyright.yml 2>/dev/null || echo "File not found in current context"

# Search for any issue references or comments about rdkit compatibility
rg "rdkit.*2025|2025.*rdkit" -A 3 -B 3

# Check git history for when the rdkit constraint was added
git log --oneline --all -S "rdkit<2025" 2>/dev/null | head -10 || echo "Git history unavailable"

Repository: deepmodeling/dpdata

Length of output: 149


🌐 Web query:

rdkit 2025.03 numpy 2.0 fix resolved 2025

💡 Result:

Short answer: RDKit tracked NumPy 2.0 support in Issue #7477 (opened May 31, 2024), but the 2025.03 release notes do not explicitly state "NumPy 2.0 support" or a dedicated fix; you should confirm by checking the specific RDKit wheel/build you plan to use (wheels must be built against NumPy 2 to be ABI-compatible). [1][2]

Sources:

  • RDKit GitHub issue "Support NumPy 2.0" (opened May 31, 2024). [1]
  • RDKit 2025.03.x release notes / releases listing. [2]

Would you like me to check a specific RDKit wheel (PyPI/conda) or your environment (python, rdkit and numpy versions) to confirm compatibility?


Do not remove the rdkit version constraint without resolving NumPy 2.0 compatibility.

The rdkit<2025.3.3 pin cannot be safely removed. RDKit 2025.03.3 has a known NumPy 2.0 ABI incompatibility—its wheels are built against NumPy 1.x and will fail at import with NumPy 2.x. This issue (RDKit #7477, opened May 31, 2024) remains unresolved as of the latest release notes, with Debian build failures still reported as recently as January 2025. Removing the constraint without confirmed NumPy 2.0 support will break the workflow.

🤖 Prompt for AI Agents
In @.github/workflows/pyright.yml at line 16, The rdkit package was unpinned in
the workflow command (the run step installing packages), but RDKit 2025.03.3 is
incompatible with NumPy 2.x; restore a version constraint (e.g., rdkit<2025.3.3)
in the install command used in the run step to prevent installing the
problematic release, keep the rest of the packages unchanged, and add a brief
inline comment referencing RDKit issue #7477 so the pin is not removed until
NumPy 2.0 compatibility is confirmed.

- uses: jakebailey/pyright-action@v2
with:
version: 1.1.363
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
**/pyproject.toml
cache-suffix: "py${{ matrix.python-version }}"
- name: Install dependencies
run: uv pip install --system .[test,amber,ase,pymatgen] coverage ./tests/plugin 'rdkit<2025.3.3' openbabel-wheel 'numpy<2.3'
run: uv pip install --system .[test,amber,ase,pymatgen] coverage ./tests/plugin rdkit openbabel-wheel
- name: Test
run: cd tests && coverage run --source=../dpdata -m unittest && cd .. && coverage combine tests/.coverage && coverage report
- name: Run codecov
Expand Down
Loading