run-llama / llama_index

LlamaIndex is a data framework for your LLM applications
https://docs.llamaindex.ai
MIT License
33.67k stars 4.73k forks source link

[Bug]: Unable to install llama-index-embeddings-bedrock #10642

Closed raveenplgithub closed 5 months ago

raveenplgithub commented 5 months ago

Bug Description

I'm not able to install llama-index-embeddings-bedrock package when llama-index-core is in version 0.10.1.

Possibly it's related with poetry dependencies in llama-index-embeddings-bedrock where there's strict dependency on llama-index-core 0.10.0.

[tool.poetry.dependencies]
python = ">=3.8.1,<3.12"
llama-index-core = "0.10.0"
boto3 = "^1.34.23"
$ poetry add llama-index-embeddings-bedrock
Using version ^0.1.1 for llama-index-embeddings-bedrock

Updating dependencies
Resolving dependencies... (0.0s)

Because no versions of llama-index-embeddings-bedrock match >0.1.1,<0.2.0
 and llama-index-embeddings-bedrock (0.1.1) depends on llama-index-core (0.10.0), llama-index-embeddings-bedrock (>=0.1.1,<0.2.0) requires llama-index-core (0.10.0).
And because llama-index-llms-bedrock (0.1.1) depends on llama-index-core (>=0.10.1,<0.11.0)
 and no versions of llama-index-llms-bedrock match >0.1.1,<0.2.0, llama-index-embeddings-bedrock (>=0.1.1,<0.2.0) is incompatible with llama-index-llms-bedrock (>=0.1.1,<0.2.0).
So, because chatbot-docs depends on both llama-index-llms-bedrock (^0.1.1) and llama-index-embeddings-bedrock (^0.1.1), version solving failed.
$ poetry show llama-index-core
 name         : llama-index-core                     
 version      : 0.10.1                               
 description  : Interface between LLMs and your data 

dependencies
 - aiohttp >=3.8.6,<4.0.0
 - dataclasses-json *
 - deprecated >=1.2.9.3
 - dirtyjson >=1.0.8,<2.0.0
 - fsspec >=2023.5.0
 - httpx *
 - nest-asyncio >=1.5.8,<2.0.0
 - networkx >=3.0
 - nltk >=3.8.1,<4.0.0
 - numpy *
 - openai >=1.1.0
 - pandas *
 - pillow >=9.0.0
 - PyYAML >=6.0.1
 - requests >=2.31.0
 - SQLAlchemy >=1.4.49
 - tenacity >=8.2.0,<9.0.0
 - tiktoken >=0.3.3
 - tqdm >=4.66.1,<5.0.0
 - typing-extensions >=4.5.0
 - typing-inspect >=0.8.0

required by
 - llama-index >=0.10.0,<0.11.0
 - llama-index-agent-openai >=0.10.1,<0.11.0
 - llama-index-embeddings-openai >=0.10.1,<0.11.0
 - llama-index-llms-anthropic >=0.10.1,<0.11.0
 - llama-index-llms-bedrock >=0.10.1,<0.11.0
 - llama-index-llms-openai >=0.10.1,<0.11.0
 - llama-index-multi-modal-llms-openai >=0.10.1,<0.11.0
 - llama-index-program-openai >=0.10.1,<0.11.0
 - llama-index-question-gen-openai >=0.10.1,<0.11.0
 - llama-index-readers-file >=0.10.1,<0.11.0

Version

0.10.1

Steps to Reproduce

poetry add llama-index-embeddings-bedrock

Relevant Logs/Tracbacks

No response

dosubot[bot] commented 5 months ago

🤖

The issue you're encountering is indeed due to the strict dependency of llama-index-embeddings-bedrock on llama-index-core version 0.10.0. This is specified in the pyproject.toml file of the llama-index-embeddings-bedrock package.

The caret (^) in the version specification ^0.10.0 means that it allows changes that do not modify the left-most non-zero digit in the version. In this case, it means any version 0.10.x where x >= 0 is acceptable. However, if llama-index-embeddings-bedrock has a strict dependency on llama-index-core version 0.10.0, it will not work with 0.10.1.

To resolve this issue, you have two options:

  1. Downgrade your llama-index-core to version 0.10.0. You can do this by running pip install llama-index-core==0.10.0.

  2. Check if there's an updated version of llama-index-embeddings-bedrock that supports llama-index-core version 0.10.1. You can do this by running pip show llama-index-embeddings-bedrock to see the latest version and its dependencies.

Please note that it's generally a good practice to keep your dependencies up-to-date, but in some cases, you might need to stick with a specific version due to compatibility issues.

If you continue to experience issues, please provide more information about your environment (Python version, OS, etc.) and the exact steps you're taking to install the package. This will help in diagnosing the problem.

Sources

#### About Dosu This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot.
logan-markewich commented 5 months ago

This was fixed this morning. Please try again, the install should work now. I've confirmed in google colab https://colab.research.google.com/drive/1xMqEU3Q7ZAUsm-Vhv1oPvfcF85I-l2x6?usp=sharing