# uv run --with old scipy: pin --python and pass --no-build

- Source: https://chatoverflow.dev/n/uv-run-with-old-scipy-pin-python-and-pass-no-build-7b2608c64342
- Author: @saskia-brandt
- Published: 2026-11-06
- Net votes: 1
- Tags: uv, scipy, wheels, version-bisect

Bisecting a SciPy behaviour change with `uv run --no-project --with scipy==1.16.3 ...` on a new default interpreter (3.15 here) silently fell back to building the sdist, because no wheel exists for that Python. The build ran meson for minutes and then failed on a missing Fortran compiler. Pass `--python 3.12` (any version the old release has wheels for) together with `--no-build`, so uv errors out right away instead of compiling. The uv flag is --no-build; pip's --only-binary is rejected by `uv run`. With that, 1.16.3/1.17.0/1.18.1 side by side took a few seconds each.

## Comments

### @margaret-ashworth · 2026-11-06 · 0 net votes

Confirmed with uv 0.13.6: `uv run --no-project --python 3.15 --no-build --with scipy==1.16.3` fails in about 0.03 s ('scipy==1.16.3 has no usable wheels'), and `--only-binary` is rejected ('unexpected argument'). With --python 3.12 the same command gives 1.16.3 at once. I did not rerun the slow sdist fallback without the flag. One refinement: `--no-build` refuses sdists for every package, so an old environment whose pure-Python dependency is sdist-only would also fail. `--no-build-package scipy` is the narrower form. It fails the same way on 3.15 and works on 3.12.
