How to Install RAGAS on Windows When pip install ragas Fails

Short answer: If pip install ragas fails on Windows, the most reliable fix is to create a virtual environment with an older, well-supported Python version (such as 3.11) and install RAGAS there. If you have to stay on a very new Python release, you can install RAGAS without its dependencies, add the missing packages one at a time, and patch out an import you do not use. Both routes are below.

I hit this while evaluating a RAG tutor project. I needed RAGAS scores (faithfulness, answer relevancy, context precision and context recall) for two versions of the pipeline, and the install kept failing on a Windows machine running Python 3.14. This post is the fix that worked, plus the cleaner route I would take next time.

Why does pip install ragas fail on Windows?

RAGAS pulls in a large tree of dependencies through LangChain and its integrations. On a very new Python version, some of those packages may not have pre-built Windows wheels yet, so pip tries to build them from source and fails. In my case, one import path also pulled in the Google Cloud SDK (through LangChain's Vertex AI integration), which is a huge download I did not need at all.

So the problem is usually not RAGAS itself. It is the dependency tree meeting a Python version that the ecosystem has not caught up with.

Where the install goes wrongpip installragasragaslangchain-communityVertex AIintegrationGoogle Cloud SDK(large download)The last two steps are only needed if Vertex AI is your evaluator model.Fix 2 cuts the chain at the Vertex AI import.

Fix 1 (recommended): use a supported Python version in a virtual environment

This is the cleanest option because you change nothing inside installed packages. Install Python 3.11 from python.org alongside your current version, then:

py -3.11 -m venv .venv
.venv\Scripts\activate
python -m pip install --upgrade pip
pip install ragas

Check that it worked:

python -c "import ragas; print(ragas.__version__)"

If that prints a version number, you are done. The py launcher comes with the official Windows installer and lets you pick a Python version per project.

Fix 2: what I did on Python 3.14

If you cannot switch Python versions, this is the workaround that got RAGAS working for me.

Step 1: install RAGAS without its dependencies

pip install ragas --no-deps

This installs the RAGAS package itself and skips the dependency tree that was failing.

Step 2: add missing packages one at a time

Try the import and read the error:

python -c "import ragas"

Each run fails with a ModuleNotFoundError that names one missing package. Install that package with pip, then run the import again. Repeat until the import gets past the missing modules. It is slow, but you only install what RAGAS actually needs for your use case.

Step 3: patch out the unused Vertex AI import

In my setup, ragas/llms/base.py imported Vertex AI classes from langchain_community. That import dragged in the Google Cloud SDK, which was large and unstable to install. I was not using Vertex AI, so I removed those imports.

Find where RAGAS is installed:

pip show ragas

Open ragas\llms\base.py inside the Location folder it prints, find the import lines that bring in Vertex AI from langchain_community, and comment them out. After that, import ragas worked cleanly.

Only do this if you do not use Vertex AI as your judge model. The patch is also lost when you upgrade RAGAS, so keep a note of it.

Which fix should you choose?

Fix 1: supported PythonFix 2: no-deps and patch
Changes installed packagesNoYes, one file
Survives a RAGAS upgradeYesNo, re-apply the patch
TimeA few minutesLonger, one package at a time
Best forMost projectsWhen you must stay on a new Python
Which fix should you use?pip install ragas fails on WindowsCan you use Python 3.11?YesNoFix 1 (recommended)Create a Python 3.11 venvpip install ragasFix 2pip install ragas --no-depsadd missing packages, patch importpython -c "import ragas" works

Frequently asked questions

Which Python version works best with RAGAS on Windows?

An established release such as 3.11 is the safest choice, because most RAGAS dependencies publish Windows wheels for it. Very new Python releases are where install failures usually appear.

Do I need the Google Cloud SDK to use RAGAS?

Not unless you use a Google model such as Vertex AI as your evaluator. If you use another provider, you can avoid it.

Is it safe to install RAGAS with --no-deps?

It works, but you take on the job of installing what is missing. Test the evaluation on a small sample first so a missing package shows up early.

What does RAGAS measure?

RAGAS scores a RAG pipeline's answers and retrieved context. Common metrics are faithfulness, answer relevancy, context precision and context recall.

What is next

With RAGAS installed, I am using it to compare a basic RAG pipeline against one with HyDE and cross-encoder reranking. Related: how adaptive top-k retrieval cut input tokens by 17%.

If you need help setting up evaluation for your own RAG system, see Work With Me.

Comments

Popular posts from this blog

Humanoid Robots 2026: Tesla Optimus, Figure AI & 1X NEO

Humanoid Robots Are Working in Real Factories — Here's What's Actually Happening

Agentic AI & Autonomous Systems: The Complete 2026 Guide (Gartner's #1 Strategic Trend)