Skip to content

[Bug] 插件要求的依赖版本与 AstrBot 核心不兼容 #80

@ARPO35

Description

@ARPO35

Plugin Version

Next-2.0.6

AstrBot Version

v4.20.0

Database Type

SQLite (default)

Operating System

Docker

Bug Description

插件要求的aiohttp版本与 AstrBot 核心不兼容导致无法安装
插件需要 3.12.15 版本
AstrBot v4.20.0 核心强制 3.13.3

Steps to Reproduce

  1. 在插件市场中安装 self_learning [NickMo](https://github.com/NickCharlie) Next-2.0.6
  2. 等待安装依赖时发生冲突
  3. 问题复现

Expected Behavior

成功安装插件

Error Logs

[2026-03-15 10:18:27.466] [Core] [INFO] [routes.plugin:511]: 正在安装插件 https://github.com/NickCharlie/astrbot_plugin_self_learning
[2026-03-15 10:18:27.472] [Core] [INFO] [core.zip_updator:157]: 正在下载更新 astrbot_plugin_self_learning ...
[2026-03-15 10:18:28.043] [Core] [INFO] [core.zip_updator:175]: 正在从默认分支下载 NickCharlie/astrbot_plugin_self_learning
[2026-03-15 10:18:31.235] [Core] [INFO] [star.updator:58]: 正在解压压缩包: /AstrBot/data/plugins/astrbot_plugin_self_learning.zip
[2026-03-15 10:18:31.706] [Core] [INFO] [star.updator:73]: 删除临时文件: /AstrBot/data/plugins/astrbot_plugin_self_learning.zip 和 /AstrBot/data/plugins/astrbot_plugin_self_learning/astrbot_plugin_self_learning-main/
[2026-03-15 10:18:33.330] [Core] [INFO] [star.star_manager:142]: 检测到插件 astrbot_plugin_self_learning 缺失依赖,正在按 requirements.txt 安装: /AstrBot/data/plugins/astrbot_plugin_self_learning/requirements.txt -> ['aiohttp', 'aiomysql', 'cachetools', 'emoji', 'guardrails-ai', 'hypercorn', 'lightrag-hku', 'mem0ai', 'networkx', 'numpy', 'pandas', 'prometheus-async', 'prometheus-client', 'psutil', 'quart-cors', 'scikit-learn']
[2026-03-15 10:18:35.075] [Core] [INFO] [utils.core_constraints:110]: 已启用核心依赖版本保护 (55 个约束)
[2026-03-15 10:18:35.077] [Core] [INFO] [utils.pip_installer:893]: Pip 包管理器 argv: ['pip', 'install', '-r', '/AstrBot/data/temp/tmphn****jz_plugin_requirements.txt', '--trusted-host', 'mirrors.aliyun.com', '-i', 'https://mirrors.aliyun.com/pypi/simple/', '-c', '/tmp/tmpi9****j7_constraints.txt']
[2026-03-15 10:18:36.796] [Core] [INFO] [utils.pip_installer:211]: Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
[2026-03-15 10:18:44.914] [Core] [INFO] [utils.pip_installer:211]: ERROR: Cannot install aiohttp==3.12.15 because these package versions have conflicting dependencies.
[2026-03-15 10:18:44.919] [Core] [INFO] [utils.pip_installer:211]: 
[2026-03-15 10:18:44.920] [Core] [INFO] [utils.pip_installer:211]: The conflict is caused by:
[2026-03-15 10:18:44.921] [Core] [INFO] [utils.pip_installer:211]:     The user requested aiohttp==3.12.15
[2026-03-15 10:18:44.923] [Core] [INFO] [utils.pip_installer:211]:     The user requested (constraint) aiohttp==3.13.3
[2026-03-15 10:18:44.924] [Core] [INFO] [utils.pip_installer:211]: 
[2026-03-15 10:18:44.925] [Core] [INFO] [utils.pip_installer:211]: Additionally, some packages in these conflicts have no matching distributions available for your environment:
[2026-03-15 10:18:44.926] [Core] [INFO] [utils.pip_installer:211]:     aiohttp
[2026-03-15 10:18:44.927] [Core] [INFO] [utils.pip_installer:211]: 
[2026-03-15 10:18:44.928] [Core] [INFO] [utils.pip_installer:211]: To fix this you could try to:
[2026-03-15 10:18:44.930] [Core] [INFO] [utils.pip_installer:211]: 1. loosen the range of package versions you've specified
[2026-03-15 10:18:44.931] [Core] [INFO] [utils.pip_installer:211]: 2. remove package versions to allow pip to attempt to solve the dependency conflict
[2026-03-15 10:18:44.932] [Core] [INFO] [utils.pip_installer:211]: 
[2026-03-15 10:18:45.024] [Core] [INFO] [utils.pip_installer:211]: ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
[2026-03-15 10:18:45.057] [Core] [ERRO] [v4.20.0] [star.star_manager:323]: 插件 astrbot_plugin_self_learning 依赖冲突: 检测到核心依赖版本保护冲突。 冲突详情: aiohttp==3.12.15 vs (constraint) aiohttp==3.13.3。插件要求的依赖版本与 AstrBot 核心不兼容,为了系统稳定,已阻止该降级行为。请联系插件作者或调整 requirements.txt。
[2026-03-15 10:18:45.083] [Core] [WARN] [v4.20.0] [star.star_manager:1262]: 安装插件 astrbot_plugin_self_learning 失败,插件安装目录:/AstrBot/data/plugins/astrbot_plugin_self_learning
[2026-03-15 10:18:45.090] [Core] [ERRO] [v4.20.0] [routes.plugin:530]: Traceback (most recent call last):
  File "/AstrBot/astrbot/dashboard/routes/plugin.py", line 512, in install_plugin
    plugin_info = await self.plugin_manager.install_plugin(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/AstrBot/astrbot/core/star/star_manager.py", line 1208, in install_plugin
    await self._ensure_plugin_requirements(
  File "/AstrBot/astrbot/core/star/star_manager.py", line 316, in _ensure_plugin_requirements
    await _install_requirements_with_precheck(
  File "/AstrBot/astrbot/core/star/star_manager.py", line 150, in _install_requirements_with_precheck
    await pip_installer.install(requirements_path=filtered_requirements_path)
  File "/AstrBot/astrbot/core/utils/pip_installer.py", line 897, in install
    await self._run_pip_with_classification(args)
  File "/AstrBot/astrbot/core/utils/pip_installer.py", line 947, in _run_pip_with_classification
    result_code = await self._run_pip_in_process(args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/AstrBot/astrbot/core/utils/pip_installer.py", line 942, in _run_pip_in_process
    raise conflict
astrbot.core.utils.pip_installer.DependencyConflictError: 检测到核心依赖版本保护冲突。 冲突详情: aiohttp==3.12.15 vs (constraint) aiohttp==3.13.3。插件要求的依赖版本与 AstrBot 核心不兼容,为了系统稳定,已阻止该降级行为。请联系插件作者或调整 requirements.txt。

Relevant Configuration

Additional Context

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions