Ray's Knowledge Base
Unlock

Install prereleases of a package and its sibling packages without a pyproject.toml change

RecipeVerified 2 Oct 2026Holds anywhere
Recipe. When to use it, the steps, and what showed that they work.

When to use#

Several related packages publish prerelease wheels (for example X.Y.Z.postN.dev0 from a develop branch). A user must get the prerelease of each package together. You do not want to edit the dependency floors in pyproject.toml for each prerelease.

A pin on one prerelease is not sufficient. pip install "pkg==2.2.0.post1.dev0" installs that prerelease, but its dependencies (dep>=0.0.13) resolve to final releases only. uv does the same.

Steps#

Let the user opt in at install time. Use one of these forms.

  1. Permit prereleases for all packages. This also permits prereleases of unrelated packages.
pip install --pre pkg
uv pip install --prerelease allow pkg
  1. Permit prereleases only for the named packages. Give each one a floor with a dev version. This works in pip and in uv.
pip install "pkg>=2.2.0.dev0" "dep-a>=0.0.13.dev0" "dep-b>=2.0.5.dev0"
  1. pip only: name the packages with --all-releases. You cannot use it together with --pre.
pip install --all-releases pkg --all-releases dep-a --all-releases dep-b pkg

The dependency floors in pyproject.toml stay as final versions (dep-a>=0.0.13). They already accept the later prereleases.

Evidence#

Dry-run resolves on 2026-10-02 against PyPI with pip 26.2.1 and uv 0.11.19 (Linux x86_64 wheels, Python 3.12), for dftracer with its dependencies dftracer-utils and pydftracer:

  • plain install: 2.2.0, 0.0.13, 2.0.5
  • --pre (pip) and --prerelease allow (uv): 2.2.0.post1.dev0, 0.0.13.post2.dev0, 2.0.5.post1.dev0
  • scoped .dev0 floors (pip and uv): the same three prereleases
  • --all-releases for each package (pip): the same three prereleases
  • dftracer==2.2.0.post1.dev0 only (pip and uv): 2.2.0.post1.dev0, but 0.0.13 and 2.0.5

The pip install documentation says: "If a Requirement specifier includes a pre-release or development version (e.g. >=0.0.dev0) then pip will allow pre-release and development versions for that requirement."

Also found by searching

  • pip install of a dev version of my package gives final versions of its dependencies
  • how do I make users get prerelease wheels of all my related packages without editing pyproject.toml
  • install prerelease of a package and its sibling packages with pip or uv
  • pip --pre only for some packages