ERROR: pip's dependency resolver does not currently take into account all the packages that are installed (Python) — how to fix
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow 2.15.0 requires numpy<2.0.0,>=1.23.5, but you have numpy 2.1.3 which is incompatible.
Successfully installed numpy-2.1.3
Quick fix: Read the 'X requires Y, but you have Z' lines. Install a compatible version (e.g. pip install "numpy<2"), upgrade the package that has the old requirement, or install everything in one command so pip resolves them together. Use a fresh virtual environment per project and check with pip check.
What it means
Despite the ERROR: prefix, the install usually succeeded (look for Successfully installed). pip is warning that the environment is now inconsistent:
tensorflow 2.15.0 requires numpy<2.0.0,>=1.23.5, but you have numpy 2.1.3 which is incompatible.
pip's resolver makes the packages in the current command consistent, but it doesn't reinstall or downgrade packages that are already installed and not mentioned. So pip install some-lib that pulls in a newer numpy can break tensorflow, which was installed earlier.
Whether this matters depends on whether you use the package that complains. Code that imports it may fail, often with confusing errors later.
To list every conflict in the environment at any time:
pip check
Cause 1: one package upgraded a shared dependency
The most common case: a new install upgraded numpy, protobuf, urllib3, pydantic or similar past what an older package allows.
Fix 1
Pin the shared dependency back into the allowed range (quote the spec so the shell doesn't treat < as a redirect):
pip install "numpy<2"
pip check
Or upgrade the package with the old requirement, since newer releases usually allow newer dependencies:
pip install --upgrade tensorflow
Cause 2: packages installed one by one
Installing packages in separate commands gives the resolver no chance to find a combination that works for all of them.
Fix 2
Install them together, so pip resolves one consistent set:
pip install tensorflow some-lib
pip install -r requirements.txt
If pip then reports ResolutionImpossible, the packages truly can't coexist at those versions. Relax the version pins in requirements.txt or find versions of the packages that agree.
Cause 3: a shared or global environment
Everything installed into the same Python (system Python, base conda, a long-lived Colab or Kaggle runtime) accumulates requirements from unrelated projects. Hosted notebooks come with hundreds of preinstalled packages, so installing almost anything prints this message about packages you never use.
Fix 3
Use one virtual environment per project:
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
In Colab/Kaggle, the conflict is often in a preinstalled package you don't import, and it can be ignored. If the package you need is affected, restart the runtime after installing so the new versions are loaded.
Cause 4: conda and pip mixed
pip doesn't know about the packages conda manages, and vice versa, so pip may overwrite a conda-installed dependency.
Fix 4
Install as much as possible with conda first, then use pip only for what conda doesn't have, in a dedicated environment:
conda create -n myproj python=3.11 numpy pandas
conda activate myproj
pip install some-pip-only-lib
Lock it down
After the environment works, record exact versions so it can be recreated:
pip freeze > requirements.txt
Tools such as pip-tools, Poetry or uv resolve all dependencies together and write a lock file, which avoids this situation.
Last updated 2026-11-30.