llama_index [Bug]:llama-index和核心之间的诗歌版本不兼容

ikfrs5lh  于 5个月前  发布在  其他
关注(0)|答案(3)|浏览(71)

问题描述

(poetry-test-py3.12) ➜  poetry-test poetry lock
Updating dependencies
Resolving dependencies... (0.6s)

Because llama-index (0.10.50) depends on llama-index-core (0.10.50)
 and no versions of llama-index match >0.10.50,<0.11.0, llama-index (>=0.10.50,<0.11.0) requires llama-index-core (0.10.50).
So, because poetry-test depends on both llama-index (^0.10.50) and llama-index-core (^0.10.50.post1), version solving failed.
(poetry-test-py3.12) ➜  poetry-test

版本

0.10.50.post1

重现步骤

使用这个 pyproject.toml (使用 poetry init 生成)

(poetry-test-py3.12) ➜  poetry-test cat pyproject.toml
[tool.poetry]
name = "poetry-test"
version = "0.1.0"
description = ""
authors = ["Yi"]
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "^3.12"
llama-index = "^0.10.50"
llama-index-core = "^0.10.50.post1"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

相关日志/回溯

  • 无响应*
dldeef67

dldeef671#

要解决在运行 poetry lock 时,llama-indexllama-index-core 之间的版本不兼容问题,您需要确保 pyproject.toml 文件中指定的依赖项彼此兼容。以下是逐步的方法:

  1. 检查 llama-index 依赖项:确保 llama-index 中的依赖项与 llama-index-core 中的依赖项不冲突。
  2. 对齐版本:确保 llama-indexllama-index-core 之间共享依赖项的版本是一致的。
  3. 更新 pyproject.toml:修改 llama-indexpyproject.toml 文件,使其与 llama-index-core 中指定的版本相匹配。
    以下是如何为 llama-index 更新 pyproject.toml 文件的示例:
[tool.poetry.dependencies]
SQLAlchemy = {extras = ["asyncio"], version = ">=1.4.49"}
dataclasses-json = "*"
deprecated = ">=1.2.9.3"
fsspec = ">=2023.5.0"
httpx = "*"
nest-asyncio = "^1.5.8"
nltk = "^3.8.1"
numpy = "<2.0.0"  # Pin until we adapt to Numpy v2
openai = ">=1.1.0"
pandas = "*"
python = ">=3.8.1,<4.0"
tenacity = ">=8.2.0,!=8.4.0,<9.0.0"  # Avoid 8.4.0 which lacks tenacity.asyncio
tiktoken = ">=0.3.3"
typing-extensions = ">=4.5.0"
typing-inspect = ">=0.8.0"
requests = ">=2.31.0"  # Pin to avoid CVE-2023-32681 in requests 2.3 to 2.30
aiohttp = "^3.8.6"
networkx = ">=3.0"
dirtyjson = "^1.0.8"
tqdm = "^4.66.1"
pillow = ">=9.0.0"
PyYAML = ">=6.0.1"
llama-cloud = "^0.0.6"
wrapt = "*"
llama-index-core = "^0.10.0"  # Ensure this matches the version in llama-index-core

通过确保 llama-indexllama-index-core 之间的依赖项及其版本保持一致,您应该能够在运行 poetry lock1(https://github.com/run-llama/llama_index/blob/main/llama-index-core/pyproject.toml)2(https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/readers/llama-index-readers-readme/pyproject.toml) 时解决版本不兼容问题。

  • 要继续与 Dosu 对话,请提及 @dosu。*
zsohkypk

zsohkypk2#

显然,如果我从pyproject.toml中移除llama-index-core,poetry会很开心,但是它将拒绝安装核心的最新修复版本。

nwsw7zdq

nwsw7zdq3#

是的,llama-indexcore的具体版本相关联,以帮助在llama-index级别进行升级和降级。这里的权衡是你所遇到的问题。
明天可能会有一个新的发布,然后你将获得最新版本:)

相关问题