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

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

问题描述

  1. (poetry-test-py3.12) poetry-test poetry lock
  2. Updating dependencies
  3. Resolving dependencies... (0.6s)
  4. Because llama-index (0.10.50) depends on llama-index-core (0.10.50)
  5. 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).
  6. So, because poetry-test depends on both llama-index (^0.10.50) and llama-index-core (^0.10.50.post1), version solving failed.
  7. (poetry-test-py3.12) poetry-test

版本

0.10.50.post1

重现步骤

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

  1. (poetry-test-py3.12) poetry-test cat pyproject.toml
  2. [tool.poetry]
  3. name = "poetry-test"
  4. version = "0.1.0"
  5. description = ""
  6. authors = ["Yi"]
  7. readme = "README.md"
  8. package-mode = false
  9. [tool.poetry.dependencies]
  10. python = "^3.12"
  11. llama-index = "^0.10.50"
  12. llama-index-core = "^0.10.50.post1"
  13. [build-system]
  14. requires = ["poetry-core"]
  15. 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 文件的示例:
  1. [tool.poetry.dependencies]
  2. SQLAlchemy = {extras = ["asyncio"], version = ">=1.4.49"}
  3. dataclasses-json = "*"
  4. deprecated = ">=1.2.9.3"
  5. fsspec = ">=2023.5.0"
  6. httpx = "*"
  7. nest-asyncio = "^1.5.8"
  8. nltk = "^3.8.1"
  9. numpy = "<2.0.0" # Pin until we adapt to Numpy v2
  10. openai = ">=1.1.0"
  11. pandas = "*"
  12. python = ">=3.8.1,<4.0"
  13. tenacity = ">=8.2.0,!=8.4.0,<9.0.0" # Avoid 8.4.0 which lacks tenacity.asyncio
  14. tiktoken = ">=0.3.3"
  15. typing-extensions = ">=4.5.0"
  16. typing-inspect = ">=0.8.0"
  17. requests = ">=2.31.0" # Pin to avoid CVE-2023-32681 in requests 2.3 to 2.30
  18. aiohttp = "^3.8.6"
  19. networkx = ">=3.0"
  20. dirtyjson = "^1.0.8"
  21. tqdm = "^4.66.1"
  22. pillow = ">=9.0.0"
  23. PyYAML = ">=6.0.1"
  24. llama-cloud = "^0.0.6"
  25. wrapt = "*"
  26. 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级别进行升级和降级。这里的权衡是你所遇到的问题。
明天可能会有一个新的发布,然后你将获得最新版本:)

相关问题