Repository: explodinggradients/ragas
Issue: Cannot install ragas with langchain 0.3
Root cause: External Dependency Breakage

[ ]  I checked the [documentation](https://docs.ragas.io/) and related resources and couldn't find an answer to my question.

**Your Question**
How do I install ragas with with langchain 0.3.0 ?

**Code Examples**
This community speaks code. Share your code snippets to help us understand your question better.

Here is a snippet of my `pyproject.toml` : 
```
[tool.poetry.dependencies]
python = ">=3.12,<3.13"
qdrant-client = "^1.11.3"
fastembed = "^0.3.6"
langchain-community = "^0.3.1"
pymupdf = "^1.24.10"
ollama = "^0.3.3"
langchain-qdrant = "^0.1.4"
langchain-ollama = "^0.2.0"
langchain-experimental = "^0.3.2"
langchain-milvus = "^0.1.5"
langgraph = "^0.2.34"
streamlit = "^1.39.0"
```

When I try `poetry add ragas` I get : 

```
Because ragas (0.1.21) depends on langchain-community (<0.3)
 and super-rag depends on langchain-community (^0.3.1), ragas is forbidden.
So, because super-rag depends on ragas (0.1.21), version solving failed.
```


**Additional context**

[The release is supposed to be compatible with langchain 0.3](https://github.com/explodinggradients/ragas/commit/95f8d7bf590f19f1d0fc302d3e64556ae5e49f18) but it does not seem to work. 

<!-- Greeting -->
Hey @nprime496! I'm here to help you with your software development questions and bugs. If you need assistance, feel free to ask!

<!-- Answer -->
The issue you're encountering is due to a version conflict between `ragas` and `langchain-community`. The `ragas` library currently depends on `langchain-community` with a version constraint of `<0.3`, while your setup requires `^0.3.1`.

To resolve this, you have a few options:

1. **Downgrade `langchain-community`:** Adjust your `pyproject.toml` to use a version of `langchain-community` that is compatible with `ragas`, such as `<0.3`.

2. **Wait for an Update:** Check if there is an upcoming update or patch for `ragas` that supports `langchain-community` `0.3.1`. You can monitor the repository for any new releases or updates.

3. **Fork and Modify:** If you need to use the latest version of `langchain-community`, consider forking the `ragas` repository and modifying the dependency constraints to suit your needs. This approach requires testing to ensure compatibility.

4. **Contact the Maintainers:** If none of the above solutions are feasible, consider reaching out to the maintainers for guidance or to inquire about future compatibility updates.

Currently, there is no specific branch or patch mentioned in the repository that addresses this compatibility issue <sup>[[1]](https://github.com/explodinggradients/ragas/issues/1217)</sup>.


<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*


@dosu the problem is supposed to be already solved. In the latest release of ragas, this requirement has been lifted.

<!-- Answer -->
To install the latest release of ragas with langchain 0.3.1, you can use:

```bash
pip install ragas
```

If you want to try the latest features directly from the main branch, use:

```bash
pip install git+https://github.com/explodinggradients/ragas.git
```

The version requirement for langchain has been lifted, so these methods should work with langchain 0.3.1 <sup>[[1]](https://github.com/explodinggradients/ragas/blob/main/README.md)</sup>.


<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*


@dosu Installing from the main branch worked, lol.

I will keep the issue open because it does not feel right : my projecttoml is not synced with my env anymore.

<!-- Answer -->
You can update your `pyproject.toml` to reflect the changes by specifying the GitHub URL for `ragas`. Here's how you can do it:

```toml
[tool.poetry.dependencies]
ragas = { git = "https://github.com/explodinggradients/ragas.git" }
```

This way, your environment will stay in sync with your `pyproject.toml`. If a new release is published, you can switch back to using a version number.


<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*


@dosu bot, interesting.

and what if I want to fix the version on the latest release tag and not the latest commit on main ?

Ok, I just checked and the latest release bounds to `<0.3` main code is not yet released so the bot is right, it is the solution for now to use directly the remote branch.

https://github.com/explodinggradients/ragas/releases/tag/v0.1.21

<!-- Answer -->
To fix the version on the latest release tag in your `pyproject.toml`, you can specify the version number directly. Since the latest release tag for `ragas` is "0.0.16" <sup>[[1]](https://github.com/explodinggradients/ragas/blob/main/docs/conf.py)</sup>, you can update your `pyproject.toml` like this:

```toml
[tool.poetry.dependencies]
ragas = "0.0.16"
```

This will ensure that you are using the latest stable release instead of the latest commit from the main branch.


<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*