Developer ToolsPython

pip 26.2: Install Dependencies Without the Package

pip 26.2 release: install dependencies without the package

pip 26.2 dropped on July 29, and for a version number that sounds incremental, it resolves a complaint Python developers have filed for sixteen years. The headliner is --only-deps, a flag that lets you install a project’s dependencies without installing the project itself. That sounds trivial until you’ve spent an hour untangling a Dockerfile that was hacking around its absence.

The Flag You’ve Been Waiting For

If you manage a Flask, FastAPI, or Django application in a container, you’ve run into this: your app is not a library. Nobody pip-installs it. But pip has historically required you to install it anyway — either as an editable install (pip install -e ., which is a bad idea in production), or by maintaining a separate requirements.txt alongside your pyproject.toml just so Docker’s layer cache works. Both approaches are workarounds for a missing primitive.

pip 26.2 ships that primitive. Run this in your project directory:

pip install --only-deps .

pip reads your pyproject.toml, installs every dependency, and stops there — no package install, no editable mode, no duplicate file to maintain. For teams already using pyproject.toml as their single source of truth, this collapses a multi-step Docker dance into one line. The GitHub issue requesting this feature collected 168 votes. The implied need goes back much further.

Before and After

The old Docker pattern required you to choose your poison:

# Option A: duplicate dependency file
COPY requirements.txt .
RUN pip install -r requirements.txt

# Option B: editable install in production (don't do this)
RUN pip install -e .

With pip 26.2:

COPY pyproject.toml .
RUN pip install --only-deps .

Venv Isolation: Experimental but Consequential

The second notable change is experimental venv-based build isolation. Previously, pip handled build environments by stuffing dependencies into temporary directories — a mechanism prone to subtle failures that were hard to reproduce. In 26.2, pip can instead create a real virtual environment per build subprocess.

Enable it with:

pip install --use-feature=venv-isolation <package>

This matters for one concrete reason right now: build isolation in pip was completely broken on Python 3.15 development builds. That bug is fixed in 26.2, and with Python 3.15’s release candidate already out (3.15.0rc1 shipped August 4) and the final release scheduled for October 1, this fix is not academic. If you’re testing against 3.15, update pip first.

Venv isolation is still experimental and has known compatibility gaps with --use-feature=inprocess-build-deps, but the pip team has flagged it as future-default behavior.

Faster Resolves, With One Caveat

pip 26.2 now caches PyPI’s simple API responses according to their Cache-Control headers. Repeated dependency resolution — common in CI — gets faster as a result. The tradeoff: newly published packages won’t appear in pip’s view for up to ten minutes, since PyPI’s cache window is around that length. If your CI pipeline publishes a package and immediately installs it in the next job, account for this delay.

Where pip Stands in the uv Era

It would be dishonest to write about pip in mid-2026 without acknowledging uv. The Astral-built, Rust-powered tool now has over 85,000 GitHub stars, runs 10 to 100 times faster than pip on most operations, and has been OpenAI-owned since March. For new projects where you control the toolchain, uv is the modern default.

But pip is still in every Python installation. It is still PyPA-governed — community-controlled, not corporate-owned. And with --only-deps landing after years of community requests, pip is demonstrably listening to what modern application developers need. The concern about uv’s acquisition is real: you are trusting a critical piece of Python infrastructure to a single AI company. pip doesn’t come with that string attached.

None of this makes pip faster. It does make pip a credible choice for teams that can’t or won’t migrate, and for the enormous number of existing Dockerfiles, CI pipelines, and deployment scripts that won’t be rewritten for uv any time soon.

Upgrade Now

If you’re on any version before 26.2, upgrade before Python 3.15 drops in October:

python -m pip install --upgrade pip

The full changelog is on the pip documentation site. pip contributor Richard Si wrote a thorough breakdown of what’s new in pip 26.2, and the official announcement thread on discuss.python.org has context from the maintainers.

pip 26.2 is not a revolution. It is a project that has been paying attention.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *