Skip to content

feat: install script environments without running - #6923

Merged
baszalmstra merged 2 commits into
prefix-dev:mainfrom
manzt:manzt/install-script
Sep 2, 2026
Merged

feat: install script environments without running#6923
baszalmstra merged 2 commits into
prefix-dev:mainfrom
manzt:manzt/install-script

Conversation

@manzt

@manzt manzt commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

I originally thought pixi update --script (#6893) was enough for tools that manage PEP 723 script environments. However, it only refreshes the resolution, but it does not materialize the environment. Today, the only command that does both is pixi run --script, which also executes the script.

These changes add pixi install --script <PATH> to materialize the same environment that pixi run --script would use, without running user code. It reuses the existing script resolution cache or adjacent lock file and the shared install path and does not introduce another script environment model.

The lifecycle is now explicit where:

  • pixi update --script selects newer compatible versions (metadata only)
  • pixi install --script reconciles and materializes the environment without broadly upgrading
  • pixi run --script same as above, but then runs user code after installing.

For example, this makes it possible to replace uv in marimo's --sandbox flow and use Pixi to install and manage packages without requiring uv. Working branch in marimo:

image

@manzt
manzt force-pushed the manzt/install-script branch 5 times, most recently from a23ead9 to 4d76f9d Compare August 31, 2026 16:45
Comment thread crates/pixi_core/src/environment/mod.rs Outdated
`pixi update --script` refreshes the resolution for a script, but it
does not materialize the environment. Until now, the only way to prepare
that environment was `pixi run --script`, which also executes the
script.

These changes add `pixi install --script` to materialize the same cached
environment without running user code. Reuse the shared install path so
script caches and adjacent lock files follow the same install semantics
as workspaces.
@manzt
manzt force-pushed the manzt/install-script branch 5 times, most recently from abb29b9 to 38040e5 Compare September 1, 2026 15:22
@manzt
manzt force-pushed the manzt/install-script branch from 38040e5 to 14971e6 Compare September 1, 2026 20:01
@baszalmstra
baszalmstra merged commit ca0ef5e into prefix-dev:main Sep 2, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants