InternLM / MindSearch

🔍 An LLM-based Multi-agent Framework of Web Search Engine (like Perplexity.ai Pro and SearchGPT)
Apache License 2.0
5.35k stars 539 forks source link

Python 版本限制以及环境冲突 #253

Open Restartired opened 3 weeks ago

Restartired commented 3 weeks ago

image

希望可以推荐使用的 python 版本:

我不知道是不是因为限制了 lmdeploy==0.5.3,导致 3.13 的 conda 环境安装 lmdeploy 失败。 ERROR: Could not find a version that satisfies the requirement lmdeploy==0.5.3 (from versions: none) ERROR: No matching distribution found for lmdeploy==0.5.3

看了一下 lmdeploy0.5.3 的发布页面,似乎支持 3.8 到 3.12 https://github.com/InternLM/lmdeploy/releases/tag/v0.5.3

使用 3.10 的 conda 环境,成功。

环境冲突

似乎与 gradio==5.3.0 有关,我不知道 poetry-version 是 conda 的问题还是说 gradio 5.3.0 和 lagent==0.5.0rc1 存在环境冲突。 image

Collecting module-wrapper<0.3.0,>=0.2.3 (from aioify->lagent==0.5.0rc1->-r requirements.txt (line 6)) Using cached module_wrapper-0.2.3-py3-none-any.whl.metadata (2.2 kB) ERROR: Cannot install -r requirements.txt (line 4) and module-wrapper because these package versions have conflicting dependencies.

The conflict is caused by: gradio 5.3.0 depends on tomlkit==0.12.0 poetry-version 0.1.5 depends on tomlkit<0.6.0 and >=0.4.6

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip to attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

尝试解决

取消了 gradio 的版本限制: 从 5.3.0 一路下载到了 3.50.2,期间有几个warning。 image image

成功跑通,但似乎还存在一些问题。 不清楚是模型使用限制,还是代码问题。

shubiao-yao commented 2 weeks ago

我在conda python3.10.0环境也遇到了同样的问题

Restartired commented 2 weeks ago

我在conda python3.10.0环境也遇到了同样的问题

如果你指的是找不到 lmdeploy==0.5.3 的环境的话,可以尝试更新一下 pip? python -m pip install --upgrade pip

至于 tomlkit 冲突的问题,我也存在。

shubiao-yao commented 2 weeks ago

我只用gpt的模型是不是就不用安装lmdeploy了啊? tomlkit 冲突的问题 我尝试像楼上所说的那样 降低下gradio的版本吧

Restartired commented 2 weeks ago

我只用gpt的模型是不是就不用安装lmdeploy了啊? tomlkit 冲突的问题 我尝试像楼上所说的那样 降低下gradio的版本吧

似乎如此,JUST DO IT.

regtm commented 2 weeks ago

Lagent depends on aiofy, which is no longer maintained. It seems that the dependency for module-wrapper ^0.3.0 is no longer compatible with the requirements of Gradio.

Zha-Miku commented 2 weeks ago

如果使用本地的模型比如ollama部署的openaiapi,是不是可以删除一些不需要的库

HaishengLiang commented 1 week ago

lmdeploy

删除 lmdeploy 即可,目前 lmdeploy 也不支持 macOS