Open nasirus opened 1 year ago
Thank you for bringing this issue to our attention. We apologize for the inconvenience. We have identified the issue and have a solution for you.
The issue is that the latest version of llama-index (v0.5.11) is not compatible with sqlalchemy v2 series environment. This is because the latest version of llama-index depends on langchain (>=0.0.123) which requires SQLAlchemy (>=1,<2).
To solve this issue, you can either:
Downgrade to llama-index v0.5.10 or earlier, which is compatible with sqlalchemy v2 series environment.
Upgrade to sqlalchemy v3 series environment, which is compatible with llama-index v0.5.11 or later.
Use the duplicate llama-index pip package. Simply replace all imports of gpt_index with llama_index if you choose to pip install llama-index.
We have also updated our documentation to reflect this change. Please refer to the following link for more information: https://gpt-index.readthedocs.io/en/latest/.
We hope this helps. If you have any further questions or concerns, please do not hesitate to reach out.
Thank you for using LlamaIndex!
Resources Used:
I was able to install llama-index up to version v0.5.9 with sqlalchemy v2 series environment, However, llama-index version 0.5.10 or later cannot be installed in a sqlalchemy v2 environment.
The following is what happens when the command is executed.
$ poetry add llama-index@latest Using version ^0.5.11 for llama-index
Updating dependencies Resolving dependencies... (0.6s)
Because no versions of langchain match >0.0.123,<0.0.124 || >0.0.124,<0.0.125 || >0.0.125,<0.0.126 || >0.0.126,<0.0.127 || >0.0.127,<0.0.128 || >0.0.128,<0.0.129 || >0.0.129,<0.0.130 || >0.0.130,<0.0.131 || >0.0.131,<0.0.132 || >0.0.132,<0.0.133 || >0.0.133,<0.0.134 || >0.0.134,<0.0.135 || >0.0.135,<0.0.136 || >0.0.136 and langchain (0.0.123) depends on SQLAlchemy (>=1,<2), langchain (>=0.0.123,<0.0.124 || >0.0.124,<0.0.125 || >0.0.125,<0.0.126 || >0.0.126,<0.0.127 || >0.0.127,<0.0.128 || >0.0.128,<0.0.129 || >0.0.129,<0.0.130 || >0.0.130,<0.0.131 || >0.0.131,<0.0.132 || >0.0.132,<0.0.133 || >0.0.133,<0.0.134 || >0.0.134,<0.0.135 || >0.0.135,<0.0.136 || >0.0.136) requires SQLAlchemy (>=1,<2). And because langchain (0.0.124) depends on SQLAlchemy (>=1,<2), langchain (>=0.0.123,<0.0.125 || >0.0.125,<0.0.126 || >0.0.126,<0.0.127 || >0.0.127,<0.0.128 || >0.0.128,<0.0.129 || >0.0.129,<0.0.130 || >0.0.130,<0.0.131 || >0.0.131,<0.0.132 || >0.0.132,<0.0.133 || >0.0.133,<0.0.134 || >0.0.134,<0.0.135 || >0.0.135,<0.0.136 || >0.0.136) requires SQLAlchemy (>=1,<2). And because langchain (0.0.125) depends on SQLAlchemy (>=1,<2) and langchain (0.0.126) depends on SQLAlchemy (>=1,<2), langchain (>=0.0.123,<0.0.127 || >0.0.127,<0.0.128 || >0.0.128,<0.0.129 || >0.0.129,<0.0.130 || >0.0.130,<0.0.131 || >0.0.131,<0.0.132 || >0.0.132,<0.0.133 || >0.0.133,<0.0.134 || >0.0.134,<0.0.135 || >0.0.135,<0.0.136 || >0.0.136) requires SQLAlchemy (>=1,<2). And because langchain (0.0.127) depends on SQLAlchemy (>=1,<2) and langchain (0.0.128) depends on SQLAlchemy (>=1,<2), langchain (>=0.0.123,<0.0.129 || >0.0.129,<0.0.130 || >0.0.130,<0.0.131 || >0.0.131,<0.0.132 || >0.0.132,<0.0.133 || >0.0.133,<0.0.134 || >0.0.134,<0.0.135 || >0.0.135,<0.0.136 || >0.0.136) requires SQLAlchemy (>=1,<2). And because langchain (0.0.129) depends on SQLAlchemy (>=1,<2) and langchain (0.0.130) depends on SQLAlchemy (>=1,<2), langchain (>=0.0.123,<0.0.131 || >0.0.131,<0.0.132 || >0.0.132,<0.0.133 || >0.0.133,<0.0.134 || >0.0.134,<0.0.135 || >0.0.135,<0.0.136 || >0.0.136) requires SQLAlchemy (>=1,<2). And because langchain (0.0.131) depends on SQLAlchemy (>=1,<2) and langchain (0.0.132) depends on SQLAlchemy (>=1,<2), langchain (>=0.0.123,<0.0.133 || >0.0.133,<0.0.134 || >0.0.134,<0.0.135 || >0.0.135,<0.0.136 || >0.0.136) requires SQLAlchemy (>=1,<2). And because langchain (0.0.133) depends on SQLAlchemy (>=1,<2) and langchain (0.0.134) depends on SQLAlchemy (>=1,<2), langchain (>=0.0.123,<0.0.135 || >0.0.135,<0.0.136 || >0.0.136) requires SQLAlchemy (>=1,<2). And because langchain (0.0.135) depends on SQLAlchemy (>=1,<2) and langchain (0.0.136) depends on SQLAlchemy (>=1,<2), langchain (>=0.0.123) requires SQLAlchemy (>=1,<2). Because no versions of llama-index match >0.5.11,<0.6.0 and llama-index (0.5.11) depends on langchain (>=0.0.123), llama-index (>=0.5.11,<0.6.0) requires langchain (>=0.0.123). Thus, llama-index (>=0.5.11,<0.6.0) requires SQLAlchemy (>=1,<2). So, because sampleproduct depends on both sqlalchemy (^2.0.9) and llama-index (^0.5.11), version solving failed.