无法更新 llamaindex

问题描述 投票:0回答:3

在 2024 年 2 月推出 v0.10 后,它对导入引入了许多重大更改。我尝试在

llamaindex
环境中更新
llama-index
,但收到以下错误:
conda

我已经尝试过
> pip install llama-index --upgrade ERROR: Cannot install llama-index-cli because these package versions have conflicting dependencies. The conflict is caused by: llama-index-vector-stores-chroma 0.1.4 depends on onnxruntime<2.0.0 and >=1.17.0 llama-index-vector-stores-chroma 0.1.3 depends on onnxruntime<2.0.0 and >=1.17.0 llama-index-vector-stores-chroma 0.1.2 depends on onnxruntime<2.0.0 and >=1.17.0 To fix this you could try to: 1. loosen the range of package versions you've specified 2. remove package versions to allow pip attempt to solve the dependency conflict ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

但遇到了同样的错误。

我也尝试安装

pip install llama-index-vector-stores-chroma

但收到此错误:

onnxruntime

如何更新
pip install onnxruntime ERROR: Could not find a version that satisfies the requirement onnxruntime (from versions: none) ERROR: No matching distribution found for onnxruntime

    

python pip llama-index
3个回答
1
投票
llama-index

。我从这个线程得到它:github.com/microsoft/onnxruntime/issues/11037

如果有理由不使用 conda forge,请留言。


0
投票
它将安装 onnxruntime-1.16.3 或更高版本,并将替换导致此问题的旧版本。


0
投票

在航站楼,

我必须通过
    pip install onnxruntime --upgrade
  1.  停用 conda 的环境
    
    我最终创建了一个新的虚拟环境
  2. conda deactivate
  3. 然后激活它
    python -m venv .venv
    我能够使用以下命令安装 onnxruntime 1.17.1
    
  4. source .venv/bin/activate
  5. 由于某些奇怪的原因,Anaconda 的 env 阻止同时安装 llama-index-core 0.10.13 和 llama-index-vector-stores-chroma 0.1.4。所以我不得不强制使用 
  6. SYSTEM_VERSION_COMPAT=0 pip install --no-cache-dir "onnxruntime>=1.17.1"
  7. SYSTEM_VERSION_COMPAT=0 pip install --no-cache-dir "llama-index-core>=0.10.13"
    最后,您应该能够
  8. SYSTEM_VERSION_COMPAT=0 pip install --no-cache-dir "llama-index-vector-stores-chroma 0.1.4"
  9. 。它应该自动尝试安装 02/27/2024 的最新版本 0.10.13.post1。
    
    
  10. 对于代码,随着新的更新,旧的代码
pip install llama-index

现在切换到

from llama_index.core.llms import ChatMessage, ChatResponse

    

© www.soinside.com 2019 - 2024. All rights reserved.