Skip to content

pixi exec#

About#

Run a command and install it in a temporary environment

Usage#

pixi exec [OPTIONS] [COMMAND]...

Arguments#

  • <COMMAND>
    The executable to run, followed by any arguments
    May be provided more than once.

Options#

  • --spec (-s) <SPEC>
    Matchspecs of package to install. If this is not provided, the package is guessed from the command
    May be provided more than once.
  • --channel (-c) <CHANNEL>
    The channels to consider as a name or a url. Multiple channels can be specified by using this field multiple times
    May be provided more than once.
  • --platform (-p) <PLATFORM>
    The platform to create the environment for
    default: current_platform
  • --force-reinstall
    If specified a new environment is always created even if one already exists
  • --list <LIST>
    Before executing the command, list packages in the environment Specify --list=some_regex to filter the shown packages

Config Options#

Description#

Run a command and install it in a temporary environment.

Remove the temporary environments with pixi clean cache --exec.

Examples#

pixi exec python

# Add a constraint to the python version
pixi exec -s python=3.9 python

# Run ipython and include the py-rattler package in the environment
pixi exec -s ipython -s py-rattler ipython

# Force reinstall to recreate the environment and get the latest package versions
pixi exec --force-reinstall -s ipython -s py-rattler ipython