How to Fix “Could Not Find a Version That Satisfies the Requirement faiss-gpu”

How to Fix “Could Not Find a Version That Satisfies the Requirement faiss-gpu”

This error almost never means your setup is broken. It means pip can’t find a faiss-gpu build that matches your system. The reason is simple: the faiss-gpu package on PyPI stopped getting new builds after version 1.7.2, so on any recent Python it has nothing to install. The fix is to install Faiss a different way: through conda, through the newer faiss-gpu-cu12 wheel, or as CPU-only faiss-cpu.

Below is the cause in one paragraph, then the exact command for your situation, and a quick test to confirm it worked.

Why you get this error

Faiss is Meta’s library for fast similarity search over large sets of vectors, which is why it shows up in so many RAG and embedding projects. It ships in two flavors: a CPU build and a GPU build.

Why you get this error
Source: reddit

The GPU pip package, named faiss-gpu, was published by a community wheel project. Its last release on PyPI is 1.7.2, and no builds were published after that. So when you run a command like pip install faiss-gpu or pip install faiss-gpu==1.7.2 on a newer Python (3.11, 3.12, 3.13), pip searches PyPI, finds no build that fits your Python version and platform, and stops with:

ERROR: Could not find a version that satisfies the requirement faiss-gpu
ERROR: No matching distribution found for faiss-gpu

You’ll also hit this on macOS and Windows even with older Python, because the GPU wheels were Linux-only. On a Mac there’s no NVIDIA GPU to target at all, so the GPU package was never going to work there.

Short version: the error is about missing builds, not a typo or a bad network. You need a different install path, not a retry.

The fastest fix: install Faiss with conda

If you have an NVIDIA GPU on Linux, conda is the smoothest route. It pulls the right CUDA pieces for you, which is the part that trips people up with pip. This is also the method the Faiss team recommends.

Create a fresh environment and install from the pytorch, nvidia, and conda-forge channels:

conda create -n faiss python=3.11
conda activate faiss
conda install -c pytorch -c nvidia -c conda-forge faiss-gpu

The conda-forge channel supplies up-to-date math libraries, and the nvidia channel supplies CUDA, which isn’t in the default channel. If you need a specific CUDA version to match another library like PyTorch, you can pin it, for example pytorch-cuda=12. The full command list lives in the official Faiss install guide.

One thing to know: the conda faiss-gpu package includes both CPU and GPU indices, and it’s built for Linux x86-64 only. There’s no GPU conda build for Mac or Windows.

Prefer pip? Use faiss-gpu-cu12

You don’t have to switch to conda. A newer set of GPU wheels exists on PyPI under different names: faiss-gpu-cu12 for CUDA 12 and faiss-gpu-cu11 for CUDA 11. These are the current pip path for GPU Faiss.

Pick the one that matches your CUDA and install it. For most recent machines that’s CUDA 12:

Source: pcgamer

# CUDA 12
pip install faiss-gpu-cu12

# or, to pull matching CUDA runtime libraries too
pip install faiss-gpu-cu12[fix_cuda]

These wheels are Linux x86-64 only and need an NVIDIA driver of R530 or newer, plus a GPU in the Pascal-through-Hopper range (compute capability 6.0 to 9.0). If you also use PyTorch in the same environment, keep both linked to the same CUDA major version so they don’t clash. You can check the requirements on the faiss-gpu-cu12 project page.

No NVIDIA GPU? Install faiss-cpu instead

If you’re on a Mac, on Windows without a supported CUDA setup, or on any machine without an NVIDIA GPU, the GPU package can’t help you. Install the CPU build instead:

pip install faiss-cpu

This is the right choice more often than people expect. Faiss on CPU is still fast for small and mid-size datasets, and the Python code you write is the same, you just don’t call the GPU helpers. For a few thousand or even a few hundred thousand vectors, CPU is usually plenty. Reach for GPU when you’re indexing millions of vectors and search speed becomes the bottleneck.

Here’s the quick way to choose:

  • Mac (Apple Silicon or Intel): faiss-cpu. No GPU option exists.
  • Windows: faiss-cpu via pip, or use conda inside WSL2 if you need GPU.
  • Linux with an NVIDIA GPU: conda faiss-gpu or pip faiss-gpu-cu12.
  • Linux without an NVIDIA GPU: faiss-cpu.

Fixing an old requirements.txt or a Colab notebook

A lot of people meet this error while following an older tutorial or running someone else’s requirements.txt that pins faiss-gpu==1.7.2. That pin was fine when the tutorial was written, but it points at a build that modern Python can’t install.

Source: isigny-sur-mer.fr

Two clean ways out:

  • If you don’t truly need the GPU, replace the line with faiss-cpu. Most tutorial-scale examples run fine on CPU, and this removes the error entirely.
  • If you do need the GPU, remove the faiss-gpu==1.7.2 pin and install faiss-gpu-cu12 with pip, or install faiss-gpu through conda as shown above.

In Google Colab specifically, the environment usually runs a newer Python than the tutorial assumed, which is why the old pin fails there. Swapping in faiss-cpu (or faiss-gpu-cu12 on a GPU runtime) gets the notebook running again.

Which install do I need?

Match your goal to the command:

What you wantDo thisWorks on
GPU, easy setup (recommended)conda install -c pytorch -c nvidia -c conda-forge faiss-gpuLinux x86-64, NVIDIA
GPU with pippip install faiss-gpu-cu12  (or faiss-gpu-cu11)Linux x86-64, NVIDIA
No NVIDIA GPU / Mac / Windowspip install faiss-cpuLinux, macOS, Windows
Old tutorial pins faiss-gpu==1.7.2Switch to conda faiss-gpu or faiss-gpu-cu12Linux x86-64, NVIDIA

Check that the install worked

After installing, confirm Python can import Faiss and, if you went the GPU route, that it sees your GPU. Run this in a Python shell:

import faiss
print(faiss.__version__)
print(“GPUs:”, faiss.get_num_gpus())

If faiss.get_num_gpus() returns a number above zero, GPU support is live. If it returns 0 but you installed a GPU build, your NVIDIA driver is likely too old or the CUDA versions don’t line up. If import faiss itself fails with a “no module named faiss” message, the install didn’t land in the environment you’re running, so double-check that the right conda env or virtualenv is active.

Frequently asked questions

Is faiss-gpu still maintained on PyPI?

The original faiss-gpu pip package stopped at 1.7.2 and gets no new builds. For pip GPU support, use faiss-gpu-cu12 or faiss-gpu-cu11 instead, or install through conda.

Can I install faiss-gpu on a Mac?

No. The GPU build targets NVIDIA GPUs on Linux, and Macs don’t have those. Install faiss-cpu with pip. Your Python code stays the same minus the GPU calls.

Do I need to install CUDA myself first?

With conda, no, it pulls CUDA for you from the nvidia channel. With the faiss-gpu-cu12 wheel you still need a recent NVIDIA driver (R530+), and the [fix_cuda] extra can add the CUDA runtime.

Should I use faiss-cpu or faiss-gpu?

Use CPU for small to mid-size datasets, up to hundreds of thousands of vectors; it’s simpler and often fast enough. Switch to GPU when you’re searching millions of vectors and speed matters.

Why does pip say “no matching distribution found”?

It means no published build matches your Python version and operating system. Since faiss-gpu has no modern builds, pip finds nothing to install and stops. Use one of the routes above.

Conclusion

The “could not find a version that satisfies the requirement faiss-gpu” error comes from missing pip builds, not a mistake on your end: the faiss-gpu package ended at 1.7.2. On a Linux machine with an NVIDIA GPU, install Faiss through conda or use the faiss-gpu-cu12 wheel. Everywhere else, install faiss-cpu. A clean import and a GPU count above zero mean you’re done.

Related post:

Can You Use an AMD CPU With an Nvidia GPU?

Should You Overclock Your GPU? An Honest 2026 Answer

Do FreeSync Monitors Work With NVIDIA GPUs? Yes, Here’s How

Does Undervolting a GPU Decrease Performance? Here Is What Actually Happens

Cooling a GPU With a CPU Cooler: What Actually Works and What Breaks