Skip to content

[Bug] v2.0.10 依赖冲突: numpy/scipy/chonkie 版本不兼容 #1342

Closed

Description

@WuSho1995

环境信息

  • MemOS 版本: v2.0.10 (从 v2.0.8 升级)
  • 系统: Linux (飞牛 NAS, x86_64)
  • Python: 3.11.2

依赖冲突详情

chonkie 1.6.1 要求 numpy>=2.0.0,但 scipy 1.10.1 要求 numpy<1.27.0

两者打架:

  • 安装 chonkie → numpy 升到 2.4.3 → scipy 崩 (ImportError: numpy.core.multiarray failed to import)
  • 降级 numpy 到 1.26.4 → chonkie 又不能用

复现步骤

  1. pip install -e . 升级到 v2.0.10
  2. 按错误提示安装缺失依赖:pip install chonkie neo4j qdrant-client
  3. 启动服务时 numpy/scipy 版本冲突

建议

  • pyproject.toml 里把 scipy 升到 1.13+(支持 numpy 2.x),或明确指定兼容版本范围

Activity

  1. github-actions commented on Apr 24, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale due to inactivity.

  2. added
    status:staleAuto-marked stale after 30d inactivity; closes 7d later unless exempt.
    on Apr 24, 2026
  3. added
    types:bugSomething isn't working | 功能异常
    area:coreMOS 编排层 / 框架底座 / 跨模块问题
    on Jun 1, 2026
  4. removed
    status:staleAuto-marked stale after 30d inactivity; closes 7d later unless exempt.
    on Jun 18, 2026
  5. added
    ai:taskDispatched to AI coding agent | 已派发给 AI 编码任务
    on Jun 29, 2026
  6. self-assigned this
    on Jun 29, 2026
  7. Memtensor-AI commented on Jun 29, 2026

    @Memtensor-AI
    Collaborator

    🤖 AutoDev has picked up this issue and started working on it.

    Task ID: c114e999523e242a
    Working branch: bugfix/autodev-1342
    Target branch: latest dev* branch
    Workflow: opsp (analysis → coding → testing → PR)

    I will post the PR link here once done. If I need more information, I will ask in the comments.

  8. Memtensor-AI commented on Jun 29, 2026

    @Memtensor-AI
    Collaborator

    ✅ AutoDev task c114e999523e242a completed.

    Summary: ## Summary

    Fixes #1342: numpy / scipy / chonkie version conflict.

    Root cause. pyproject.toml [tool.poetry.group.eval] declared scipy = "^1.10.1". scipy 1.10.x pins numpy<1.27.0 (verified via the PyPI JSON metadata), while chonkie>=1.6.0 requires numpy>=2.0.0. The two constraints are jointly unsatisfiable, so any environment that ends up with both packages (the user's reproduction installs chonkie on top of an apt-installed scipy 1.10.x) raises ImportError: numpy.core.multiarray failed to import.

    Fix. Bumped the eval-group scipy floor from ^1.10.1 to ^1.13.0 (scipy 1.13 is the first release supporting numpy 2.x) and added two explanatory comments — one near the bumped floor and one above the chonkie entry in the mem-reader extras — so future readers see the numpy 2.x implication.

    Scope. scipy is only imported by evaluation/scripts/longmemeval/lme_eval.py and evaluation/scripts/locomo/locomo_eval.py; nothing under src/memos/ references it (grep clean). The change is therefore constraint-only, no source code path is affected.

    Verification. ruff check pyproject.toml → "All checks passed!"; ruff format --check pyproject.toml → no diff; pytest tests/chunkers/ → 3 passed in 4.26s; TOML reparsed via tomli.load reports eval scipy= ^1.13.0. The committed poetry.lock already resolves scipy to 1.15.3 / 1.16.0 and numpy to 2.2.6 / 2.3.1, all of which satisfy the new ^1.13.0 floor, so a re-lock would be a no-op and is deferred to the pre-commit poetry-lock hook on the maintainer's machine.

    Base branch: main
    Branch: bugfix/autodev-1342
    Commit: 36c24be
    PR: #1971
    Assigned to: @MatthewZhuang, @CarltonXiang, @syzsunshine219, @World-controller
    Reviewers: @MatthewZhuang, @CarltonXiang, @syzsunshine219, @World-controller

  9. added
    ai:testingAI agent is running tests | AI 正在运行测试
    and removed
    ai:codingAI agent is coding | AI 正在编码
    on Jun 29, 2026
  10. added a commit that references this issue on Jul 2, 2026
    38ee5c2
  11. added and removed
    ai:testingAI agent is running tests | AI 正在运行测试
    ai:taskDispatched to AI coding agent | 已派发给 AI 编码任务
    on Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:coreMOS 编排层 / 框架底座 / 跨模块问题types:bugSomething isn't working | 功能异常

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions