在 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
?
llama-index
。我从这个线程得到它:github.com/microsoft/onnxruntime/issues/11037
如果有理由不使用 conda forge,请留言。
它将安装 onnxruntime-1.16.3 或更高版本,并将替换导致此问题的旧版本。
在航站楼,
我必须通过
pip install onnxruntime --upgrade
停用 conda 的环境我最终创建了一个新的虚拟环境
conda deactivate
python -m venv .venv
我能够使用以下命令安装 onnxruntime 1.17.1
source .venv/bin/activate
SYSTEM_VERSION_COMPAT=0 pip install --no-cache-dir "onnxruntime>=1.17.1"
SYSTEM_VERSION_COMPAT=0 pip install --no-cache-dir "llama-index-core>=0.10.13"
最后,您应该能够SYSTEM_VERSION_COMPAT=0 pip install --no-cache-dir "llama-index-vector-stores-chroma 0.1.4"
pip install llama-index
现在切换到
from llama_index.core.llms import ChatMessage, ChatResponse