Skip to content

pixi global add#

Adds dependencies to an environment

Usage#

pixi global add [OPTIONS] --environment <ENVIRONMENT> [PACKAGE]...

Arguments#

  • <PACKAGE>
    The dependency as names, conda MatchSpecs
    May be provided more than once.

Options#

  • --path <PATH>
    The path to the local package
  • --build-backend <BUILD_BACKEND>
    The build backend to build the source with, when the source does not provide its own package manifest (or to override the one it has). Accepts a name with an optional version constraint, e.g. pixi-build-rust or "pixi-build-rust>=0.3,<0.4"
  • --package <KEY=VALUE>
    Additional fields of the inline package definition, as DOTTED_KEY=TOML_VALUE pairs that are recorded under the package key of the dependency, e.g. host-dependencies.hatchling="*" or build.config.extra-args=["--all-features"]
    May be provided more than once.
  • --environment (-e) <ENVIRONMENT>
    Specifies the environment that the dependencies need to be added to
    required: true
  • --expose <EXPOSE>
    Add one or more mapping which describe which executables are exposed. The syntax is exposed_name=executable_name, so for example python3.10=python. Alternatively, you can input only an executable_name and executable_name=executable_name is assumed
    May be provided more than once.

Config Options#

Git Options#

Description#

Adds dependencies to an environment

Example:

  • pixi global add --environment python numpy
  • pixi global add --environment my_env pytest pytest-cov --expose pytest=pytest

Examples#

pixi global add python=3.9.* --environment my-env
pixi global add python=3.9.* --expose py39=python3.9 --environment my-env
pixi global add numpy matplotlib --environment my-env
pixi global add numpy matplotlib --expose np=python3.9 --environment my-env