Unable to install Python package llama-index-embeddings-huggingface
I am trying to implement the code discussed in the HuggingFace cookbook article atBuilding A RAG Ebook “Librarian” Using LlamaIndex - Hugging Face Open-Source AI Cookbook.I am on an iMac Pro running Sequoia 15.1.1 and Python 3.13.0. Unfortunately the article does not provide package versions.I get to the point where I am trying to install the package in question:llama-index-embeddings-huggingfaceI get the following error:ERROR: Cannot install llama-index-embeddings-huggingface==0.1.3, llama-index-embeddings-huggingface==0.1.4 and llama-index-embeddings-huggingface==0.1.5 because these package versions have conflicting dependencies.The conflict is caused by:llama-index-embeddings-huggingface 0.1.5 depends on torch<3.0.0 and >=2.1.2
llama-index-embeddings-huggingface 0.1.4 depends on torch<3.0.0 and >=2.1.2
llama-index-embeddings-huggingface 0.1.3 depends on torch<3.0.0 and >=2.1.2I assume that torch is PyTorch, which is not currently installed.I am using the command:python3 -m pip install llama-index-embeddings-huggingfacewhich causes the mentioned error.I am not sure what to try to resolve the conflict.
2024-11-25T15:24:45Z
Hey,I haven’t faced the same problem, so maybe my suggestion won’t be that useful, but I think it’ll fix the issue.First, instead of using pip as package manager, install uv. Then, create an environment, uv venv, follow the instructions, then uv pip “packages”. Uv is very efficient in solving compatibility problems.If it doesn’t work, I’d suggest downloading the package directly from github and manually installing with uv pip install .github.comllama_index/llama-index-integrations/embeddings at main · run-llama/llama_indexLlamaIndex is a data framework for your LLM applications - run-llama/llama_index
2024-11-25T15:27:10Z
Also, your python is too recent, probably that’s the problem. With uv you can get a specific version for the environment.