diff --git a/latest b/latest index 88b72b96e..76b2d23e8 120000 --- a/latest +++ b/latest @@ -1 +1 @@ -v0.39.2-prerelease.2 \ No newline at end of file +v0.39.2 \ No newline at end of file diff --git a/v0.39.2/404.html b/v0.39.2/404.html new file mode 100644 index 000000000..34fb6ab60 --- /dev/null +++ b/v0.39.2/404.html @@ -0,0 +1,1535 @@ + + + +
+ + + + + + + + + + + + + + +All notable changes to this project will be documented in this file.
+The format is based on Keep a Changelog, +and this project adheres to Semantic Versioning.
+Patch release to fix the binary generation in CI.
+pixi project name
CLI by @LiamConnors in #2649fs-err
in more places by @Hofer-Julian in #2636tclf
from community.md📑 by @KarelZe in #2619pixi upgrade
by @Hofer-Julian in #2472detached-environments
not used by @ruben-arts in #2627cargo-dist
for releases by @baszalmstra in #2566pixi build
Preview work#[build-system.build-backend]
by @baszalmstra in #2601[workspace.build-variants]
by @wolfv in #2634rich
and pixi-build-python
and remove flask by @Hofer-Julian in #2638concurrency
configuration in the pixi.toml
file.
+This allows you to set the number of concurrent solves or downloads that can be run at the same time.pixi shell
, it will now search first in the current directory and its parent directories. more infoconcurrency
configuration by @ruben-arts in #2569XDG_CONFIG_HOME
/.config
to search of pixi global manifest path by @hoxbro in #2547pixi global sync
collect errors rather than returning early by @Hofer-Julian in #2586pixi global list
failing for empty environments by @Hofer-Julian in #2571pixi global
report formatting by @Hofer-Julian in #2595We've merged in the main pixi build
feature branch. This is a big change but shouldn't have affected any of the current functionality.
+If you notice any issues, please let us know.
It can be turned on by preview = "pixi-build"
in your pixi.toml
file. It's under heavy development so expect breaking changes in that feature for now.
pixi build
and workspaces by @tdejager in #2250pypi-index
per pypi-dependency
+[dependency-groups]
(PEP735) support in pyproject.toml
+pixi search
output!preview
features by @tdejager in #2489pixi search
output by @delsner in #2440pixi global
by @bahugo in #2362pixi global
by @wolfv in #2528win-arm64
by @baszalmstra in #2538pixi global update
by @nichmor in #2530PATH
env var with dynamic elements on pixi global
by @wolfv in #2541ppc64le
arch by @wolfv in #2540pixi project export conda-environment
by @nmarticorena in #2533pixi project export
by @traversaro in #2539We now allow the use of prefix.dev
channels with sharded repodata:
Running pixi search rubin-env
using hyperfine
on the default versus our channels gives these results:
Cache Status | +Channel | +Mean [ms] | +Relative | +
---|---|---|---|
With cache | +https://prefix.dev/conda-forge |
+69.3 | +1.00 | +
Without | +https://prefix.dev/conda-forge |
+389.5 | +5.62 | +
With cache | +https://conda.anaconda.org/conda-forge |
+1043.3 | +15.06 | +
Without | +https://conda.anaconda.org/conda-forge |
+2420.3 | +34.94 | +
[activation.env]
are not completely overridden by [target.
tables, by @hameerabbasi in #2396build
in pixi upgrade
by @ruben-arts in #2476pixi upgrade
your project dependencies.pixi run
startup times.pixi upgrade
by @Hofer-Julian in #2368--prepend
option for pixi project channel add
by @mrswastik-robot in #2447pixi global
docs by @Hofer-Julian in #2437--silent
instead of --no-progress-meter
for old curl
by @jaimergp in #2428pixi global
now exposed binaries are not scripts anymore but actual executables.
+Resulting in significant speedup and better compatibility with other tools.
.pixi/.gitignore
containing *
by @maresb in #23610.4.30
by @tdejager in #2372task list
by @jjjermiah in #2402pixi global install
now takes a flag --with
, inspired by uv tool install
. If you only want to add dependencies without exposing them, you can now run pixi global install ipython --with numpy --with matplotlib
pixi global
subcommandspixi global install --with
by @Hofer-Julian in #2332pixi-global.toml
can be found by @Hofer-Julian in #2304pixi global upgrade-all
error message by @Hofer-Julian in #2296pixi global
by @chawyehsu in #2320This is the first release with the new pixi global
implementation. It's a full reimplementation of pixi global
where it now uses a manifest file just like pixi
projects. This way you can declare your environments and save them to a VCS.
It also brings features like, adding dependencies to a global environment, and exposing multiple binaries from the same environment that are not part of the main installed packages.
+Test it out with: +
# Normal feature
+pixi global install ipython
+
+# New features
+pixi global install \
+ --environment science \ # Defined the environment name
+ --expose scipython=ipython \ # Expose binaries under custom names
+ ipython scipy # Define multiple dependencies for one environment
+
This should result in a manifest in $HOME/.pixi/manifests/pixi-global.toml
:
+
version = 1
+
+[envs.ipython]
+channels = ["conda-forge"]
+dependencies = { ipython = "*" }
+exposed = { ipython = "ipython", ipython3 = "ipython3" }
+
+[envs.science]
+channels = ["conda-forge"]
+dependencies = { ipython = "*", scipy = "*" }
+exposed = { scipython = "ipython" }
+
Checkout the updated documentation on this new feature: +- Main documentation on this tag: https://pixi.sh/v0.33.0/ +- Global CLI documentation: https://pixi.sh/v0.33.0/reference/cli/#global +- The implementation documentation: https://pixi.sh/v0.33.0/features/global_tools/ +- The initial design proposal: https://pixi.sh/v0.33.0/design_proposals/pixi_global_manifest/
+pixi self-update
will only work on the binaries from the GitHub releases, avoiding accidentally breaking the installation.gcs://
conda registries.pixi shell
.gcs://
conda registries by @clement-chaneching in #2263pixi list
docs by @Hofer-Julian in #22691.81
by @wolfv in #2227The biggest fix in this PR is the move to the latest rattler as it came with some major bug fixes for macOS and Rust 1.81 compatibility.
+Thanks to our maintainer @baszamstra! +He sped up the resolver for all cases we could think of in #2162 +Check the result of times it takes to solve the environments in our test set: +
+nodefaults
to imported conda envs by @ruben-arts in #2097.gitignore
by @ruben-arts in #2095--no-activation
option to prevent env activation during global install/upgrade by @183amir in #1980--priority
arg to project channel add
by @minrk in #2086pixi global
mention no-activation
by @Hofer-Julian in #2109install
by @Hofer-Julian in #2128pixi update --json
by @scottamain in #2160--import env_file
breaks channel priority by @fecet in #2113self-update
by @apoorvkh in #2132get_or_insert_nested_table
by @Hofer-Julian in #2167install.sh
PATH handling and general robustness by @Arcitec in #2189pixi run
without input by @ruben-arts in #2193I want to thank @synapticarbors and @abkfenris for starting the work on pixi project export
.
+Pixi now supports the export of a conda environment.yml
file and a conda explicit specification file.
+This is a great addition to the project and will help users to share their projects with other non pixi users.
pixi search
by @Hofer-Julian in #2018environment.yml
by @abkfenris in #2003system-requirements
information by @ruben-arts in #2079conda-pypi-map
for feature channels by @nichmor in #2038subdirectory
in pypi url by @ruben-arts in #2065pyproject.toml
by @ruben-arts in #2075strip_channel_alias
from rattler by @Hofer-Julian in #2017psutils
by @Hofer-Julian in #2083pixi init
for pyproject.toml
by @Hofer-Julian in #1947init
add dependencies independent of target and don't install by @ruben-arts in #1916keyrings.artifacts
to the list of project built with pixi
by @jslorrma in #1908INIT_CWD
to activated env pixi run
by @ruben-arts in #1798__linux
default to 4.18
by @ruben-arts in #1887pixi global
by @Hofer-Julian in #1800pixi global
proposal by @Hofer-Julian in #1861channels
required in pixi global
manifest by @Hofer-Julian in #1868rlimit
by @baszalmstra in #1766NamedChannelOrUrl
by @ruben-arts in #1820pixi search
by @baszalmstra in #1849pixi tree -i
duplicate output by @baszalmstra in #1847find-links
with manifest-path by @baszalmstra in #1864.pixi
folder by @baszalmstra in #1866pub(crate) fn
in order to detect and remove unused functions by @Hofer-Julian in #1805TaskNode::full_command
for tests by @Hofer-Julian in #1809Default
for more structs by @Hofer-Julian in #1824get_up_to_date_prefix
to update_prefix
by @Hofer-Julian in #1837HasSpecs
implementation more functional by @Hofer-Julian in #1863init
by @ruben-arts in #1775pixi_spec
crate by @baszalmstra in #1741This release contains a lot of refactoring and improvements to the codebase, in preparation for future features and improvements. +Including with that we've fixed a ton of bugs. To make sure we're not breaking anything we've added a lot of tests and CI checks. +But let us know if you find any issues!
+As a reminder, you can update pixi using pixi self-update
and move to a specific version, including backwards, with pixi self-update --version 0.27.0
.
pixi run
completion for fish
shell by @dennis-wey in #1680pixi init
create hatchling pyproject.toml by @Hofer-Julian in #1693[project]
table optional for pyproject.toml
manifests by @olivier-lacroix in #1732fish
completions location by @tdejager in #1647hatchling
by @Hofer-Julianupdate
command exist by @olivier-lacroix in #1690pixi exec
in GHA docs by @pavelzw in #1724hatchling
is used everywhere in documentation by @olivier-lacroix in #1733pep440_rs
from crates.io and use replace by @baszalmstra in #1698pixi add
with more than just package name and version by @ruben-arts in #1704--no-lockfile-update
by @ruben-arts in #1683pixi.toml
when pyproject.toml
is available. by @ruben-arts in #1640macos-13
by @ruben-arts in #1739activation.env
vars are by @ruben-arts in #1740pixi_manifest
by @baszalmstra in #1656pixi::consts
and pixi::config
into separate crates by @tdejager in #1684pixi_manifest
by @tdejager in #1700HasFeatures
by @tdejager in #1712HasFeatures
trait by @tdejager in #1717utils
by @tdejager in #1718fancy
to its own crate by @tdejager in #1722config
to repodata functions by @tdejager in #1723pypi-mapping
to its own crate by @tdejager in #1725utils
into 2 crates by @tdejager in #1736pixi_manifest
lib by @tdejager in #1661pinning-strategy
in the config. e.g. semver
-> >=1.2.3,<2
and no-pin
-> *
) #1516channel-priority
in the manifest. #1631pinning-strategy
to the configuration by @ruben-arts in #1516channel-priority
to the manifest and solve by @ruben-arts in #1631nushell
completion by @Hofer-Julian in #1599nushell
completions for pixi run
by @Hofer-Julian in #1627pixi run --environment
for nushell by @Hofer-Julian in #1636pyproject.toml
parser by @nichmor in #1592pixi global install
by @ruben-arts in #1626cargo add
by @Hofer-Julian in #1600cargo add
" by @Hofer-Julian in #1605poetry
and conda
by @ruben-arts in #1624clap_complete_nushell
to dependencies by @Hofer-Julian in #1625stdout
for machine readable output by @Hofer-Julian in #1639pixi exec
command, execute commands in temporary environments, useful for testing in short-lived sessions.system-requirements
table, this is explained heregeos-rs
by @Hofer-Julian in #1563pixi shell
by @ruben-arts in #1507unix
machines, using pixi run --clean-env TASK_NAME
.pixi clean
or the cache with pixi clean cache
pixi clean
command by @ruben-arts in #1325--clean-env
flag to tasks and run command by @ruben-arts in #1395description
field to task
by @jjjermiah in #1479list_global_packages
by @dhirschfeld in #1458pixi info
by @ruben-arts in #1459--frozen
by @ruben-arts in #1468pixi install --all
output missing newline by @vigneshmanick in #1487pixi config
and pixi update
pixi config
allows you to edit
, set
, unset
, append
, prepend
and list
your local/global or system configuration.pixi update
re-solves the full lockfile or use pixi update PACKAGE
to only update PACKAGE
, making sure your project is using the latest versions that the manifest allows for.pixi config
command by @chawyehsu in #1339pixi list --explicit
flag command by @jjjermiah in #1403[activation.env]
table for environment variables by @ruben-arts in #1156--all
at once by @tdejager in #1413pixi update
command to re-solve the lockfile by @baszalmstra in #1431 (fixes 20 :thumbsup:)detached-environments
to the config, move environments outside the project folder by @ruben-arts in #1381 (fixes 11 :thumbsup:)remove
arguments with add
by @olivier-lacroix in #1406--no-lockfile-update
. by @tobiasraabe in #1396pixi add --pypi 'package @ package.whl'
, perfect for adding just build wheels to your environment in CI.pixi add --pypi 'package_from_git @ git+https://github.com/org/package.git'
, to add a package from a git repository.pixi add --pypi 'package_from_path @ file:///path/to/package' --editable
, to add a package from a local path.pixi add --pypi
by @wolfv in #1244install
cli doc by @vigneshmanick in #1336pixi project help
by @notPlancha in #1358pypi
dependencies. by @ruben-arts in #1366osx-64
on osx-arm64
and wasm
environments.no-default-feature
option to simplify usage of environments.osx-64
on osx-arm64
and wasm
environments by @wolfv in #1020no-default-feature
option to environments by @olivier-lacroix in #1092/etc/pixi/config.toml
to global configuration search paths by @pavelzw in #1304task list
by @Hoxbro in #1286depends_on
to depends-on
by @ruben-arts in #1310pixi q
instead of only name by @ruben-arts in #1314rattler
by @baszalmstra in #1327schema.json
normalization, add to docs by @bollwyvl in #1265env
variables in the task
definition, these can also be used as default values for parameters in your task which you can overwrite with your shell's env variables.
+e.g. task = { cmd = "task to run", env = { VAR="value1", PATH="my/path:$PATH" } }
env
to the tasks to specify tasks specific environment variables by @wolfv in https://github.com/prefix-dev/pixi/pull/972--pyproject
option to pixi init
with a pyproject.toml by @olivier-lacroix in #1188pixi.lock
by @ruben-arts in #1209priority
definition by @ruben-arts in #1234--no-deps
when pip installing in editable mode by @glemaitre in #1220_
with -
when creating environments from features by @wolfv in #1203task = { cmd = "task to run", cwd = "folder", inputs = "input.txt", output = "output.txt"}
Where input.txt
and output.txt
where previously in folder
they are now relative the project root. This changed in: #1202task = { cmd = "task to run", inputs = "input.txt"}
previously searched for all input.txt
files now only for the ones in the project root. This changed in: #1204This fixes the issue where pixi would generate broken environments/lockfiles when a mapping for a brand-new version of a package is missing.
+pixi tree
command to show the dependency tree of the project.pixi tree
command to show dependency tree by @abkfenris in #1069pixi add --feature test --pypi package
) by @ruben-arts in #1135--no-progress
to disable all progress bars by @baszalmstra in #1105pixi add conda-forge::rattler-build
) by @baszalmstra in #1079tool.pixi.project.name
from project.name
by @olivier-lacroix in #1112features
and environments
from extras by @olivier-lacroix in #1077PIXI_ARCH
for pixi installation by @beenje in #1129tree
and list
commands by @ruben-arts in #1145conda-meta/history
to prevent conda.history.History.parse()
error by @jaimergp in #1117pyproject.toml
by @tdejager in #1121pyproject.toml
, now pixi reads from the [tool.pixi]
table.git
, path
, and url
dependencies.++[!TIP] +These new features are part of the ongoing effort to make pixi more flexible, powerful, and comfortable for the python users. +They are still in progress so expect more improvements on these features soon, so please report any issues you encounter and follow our next releases!
+
pyproject.toml
by @olivier-lacroix in #999XDG_CONFIG_HOME
and XDG_CACHE_HOME
compliance by @chawyehsu in #1050zsh
may be used for installation on macOS by @pya in #1091pixi auth
documentation by @ytausch in #1076rstudio
to the IDE integration docs by @wolfv in #1144A quick bug-fix release for pixi list
.
pixi list
by @baszalmstra in #1033pixi global
commands, thanks to @chawyehsu!task
execution thanks to caching 🚀 Tasks that already executed successfully can be skipped based on the hash of the inputs
and outputs
.inputs
and outputs
hash based task skipping by @wolfv in #933pixi search
with platform selection and making limit optional by @wolfv in #979watch_file
in direnv usage by @pavelzw in #983linenums
to avoid buggy visualization by @ruben-arts in #1002install.sh
in Git Bash by @jdblischak in #966json
entries by @wolfv in #971tool
to strict json schema by @ruben-arts in #9690.16.0
by @ruben-arts in #951v0.19.0
by @AliPiccioniQC in #885pixi run
if platform is not supported by @ruben-arts in #878pixi global list
display format by @chawyehsu in #723init --import
by @ruben-arts in #855[pypi-dependencies]
now get build in the created environment so it uses the conda installed build tools.pixi init --import env.yml
to import an existing conda environment file.[target.unix.dependencies]
to specify dependencies for unix systems instead of per platform.++[!WARNING] +This versions build failed, use
+v0.15.1
--feature
to pixi add
(#803)PIXI_NO_PATH_UPDATE
variable (#822)mike
to the documentation and update looks (#809)self-update
(#823)jlap
for now (#836)Now, solve-groups
can be used in [environments]
to ensure dependency alignment across different environments without simultaneous installation.
+This feature is particularly beneficial for managing identical dependencies in test
and production
environments.
+Example configuration:
[environments]
+test = { features = ["prod", "test"], solve-groups = ["group1"] }
+prod = { features = ["prod"], solve-groups = ["group1"] }
+
test
and production
.
+-f
/--feature
to the pixi project platform
command by @ruben-arts in #785pixi list
by @ruben-arts in #775shell-hook
by @ruben-arts in https://github.com/prefix-dev/pixi/pull/811sdist
with direct references by @nichmor in https://github.com/prefix-dev/pixi/pull/813environments
by @ruben-arts in #790This release is pretty crazy in amount of features! The major ones are:
+- We added support for multiple environments. :tada: Checkout the documentation
+- We added support for sdist
installation, which greatly improves the amount of packages that can be installed from PyPI. :rocket:
++[!IMPORTANT]
+Renaming of
PIXI_PACKAGE_*
variables: ++Check documentation here: https://pixi.sh/environment/ +PIXI_PACKAGE_ROOT -> PIXI_PROJECT_ROOT +PIXI_PACKAGE_NAME -> PIXI_PROJECT_NAME +PIXI_PACKAGE_MANIFEST -> PIXI_PROJECT_MANIFEST +PIXI_PACKAGE_VERSION -> PIXI_PROJECT_VERSION +PIXI_PACKAGE_PLATFORMS -> PIXI_ENVIRONMENT_PLATFORMS +
[!IMPORTANT]
+The
+.pixi/env/
folder has been moved to accommodate multiple environments. +If you only have one environment it is now named.pixi/envs/default
.
polarify
use-case as an example by @ruben-arts in #735pixi info -e/--environment
option by @ruben-arts in #676pixi channel add -f/--feature
option by @ruben-arts in #700pixi channel remove -f/--feature
option by @ruben-arts in #706pixi remove -f/--feature
option by @ruben-arts in #680pixi task list -e/--environment
option by @ruben-arts in #694pixi task remove -f/--feature
option by @ruben-arts in #694pixi install -e/--environment
option by @ruben-arts in #722pypi-dependencies
by @tdejager in #664pypi-dependencies
by @tdejager in #716pixi list
command by @hadim in #665pixi shell-hook
command by @orhun in #672#679 #684pixi self-update
by @hadim in #675PIXI_NO_PATH_UPDATE
for PATH update suppression by @chawyehsu in #692PyPiRequirement
by @orhun in #744tabwriter
instead of comfy_table
by @baszalmstra in #745[ or ]
) by @JafarAbdi in #677__pycache__
removal issues by @wolfv in #573pixi search
result correct by @chawyehsu in #713pixi info
by @ruben-arts in #728pixi global upgrade
, pixi project version
commands, a PIXI_HOME
variable.pixi.toml
file already.global upgrade
command to pixi by @trueleo in #614PIXI_HOME
by @chawyehsu in #627--pypi
option to pixi remove
by @marcelotrevisani in https://github.com/prefix-dev/pixi/pull/602project version {major,minor,patch}
CLIs by @hadim in https://github.com/prefix-dev/pixi/pull/633Project
to Environment
by @baszalmstra in #630system-requirements
from Environment by @baszalmstra in #632activation.scripts
into Environment by @baszalmstra in #659pypi-dependencies
from Environment by @baszalmstra in https://github.com/prefix-dev/pixi/pull/656features
and environments
by @ruben-arts in https://github.com/prefix-dev/pixi/pull/636windows
and unix
system requirements by @baszalmstra in https://github.com/prefix-dev/pixi/pull/635CODE_OF_CONDUCT.md
by @ruben-arts in https://github.com/prefix-dev/pixi/pull/648Full Changelog: https://github.com/prefix-dev/pixi/compare/v0.11.0...v0.12.0
+pixi auth
in #642sdist
and multi environment featurepixi
improve!pixi project {version|channel|platform|description}
by @hadim in #579winget-releaser
gets correct identifier by @ruben-arts in #561system-requirements
by @ruben-arts in #595Full Changelog: https://github.com/prefix-dev/pixi/compare/v0.10.0...v0.11.0
+pypi-dependencies
support, now install even more of the pypi packages.pixi add --pypi
command to add a pypi package to your project.>=1.2.3, <1.3
) when adding requirement, instead of 1.2.3.*
by @baszalmstra in https://github.com/prefix-dev/pixi/pull/536rip
to fix by @tdejager in https://github.com/prefix-dev/pixi/pull/543.pyc
) support by @baszalmstra.data
directory headers
by @baszalmstrapixi add --pypi
command by @ruben-arts in https://github.com/prefix-dev/pixi/pull/539build
and host
specs while getting the best version by @ruben-arts in https://github.com/prefix-dev/pixi/pull/538winget
releaser by @ruben-arts in https://github.com/prefix-dev/pixi/pull/547rerun-sdk
example, force driven graph of pixi.lock
by @ruben-arts in https://github.com/prefix-dev/pixi/pull/548Full Changelog: https://github.com/prefix-dev/pixi/compare/v0.9.1...v0.10.0
+scripts
are now fixed. For example: https://github.com/prefix-dev/pixi/issues/516rip
to add scripts by @baszalmstra in https://github.com/prefix-dev/pixi/pull/517Full Changelog: https://github.com/prefix-dev/pixi/compare/v0.9.0...v0.9.1
+pixi remove
, pixi rm
to remove a package from the environmentpip install -e
issue that was created by release v0.8.0
: https://github.com/prefix-dev/pixi/issues/507pixi remove
command by @Wackyator in https://github.com/prefix-dev/pixi/pull/483[pypi-dependencies]
@baszalmstra in https://github.com/prefix-dev/pixi/pull/508Full Changelog: https://github.com/prefix-dev/pixi/compare/v0.8.0...v0.9.0
+[pypi-dependencies]
ALPHA RELEASE🐍🎉, you can now add PyPI dependencies to your pixi project.pixi run
has been improved with better errors and showing what task is run.++[!NOTE] +
+[pypi-dependencies]
support is still incomplete, missing functionality is listed here: https://github.com/orgs/prefix-dev/projects/6. +Our intent is not to have 100% feature parity withpip
, our goal is that you only needpixi
for both conda and pypi packages alike.
rattler
@ruben-arts in https://github.com/prefix-dev/pixi/pull/496pypi-dependencies
by @baszalmstra in https://github.com/prefix-dev/pixi/pull/494command not found
is returned by @ruben-arts in https://github.com/prefix-dev/pixi/pull/488pixi.sh
by @ruben-arts in https://github.com/prefix-dev/pixi/pull/458 && https://github.com/prefix-dev/pixi/pull/459 && https://github.com/prefix-dev/pixi/pull/460RECORD not found
issue by @baszalmstra in https://github.com/prefix-dev/pixi/pull/495.gitignore
and give better errors by @ruben-arts in https://github.com/prefix-dev/pixi/pull/490pypi-dependencies
by @baszalmstra in https://github.com/prefix-dev/pixi/pull/478pypi-dependencies
type by @ruben-arts in https://github.com/prefix-dev/pixi/pull/471pypi-dependencies
parsing errors by @ruben-arts in https://github.com/prefix-dev/pixi/pull/479ctypes
by @liquidcarbon in https://github.com/prefix-dev/pixi/pull/441rerun
example by @ruben-arts in https://github.com/prefix-dev/pixi/pull/489pypi-dependencies
by @ruben-arts in https://github.com/prefix-dev/pixi/pull/481Full Changelog: https://github.com/prefix-dev/pixi/compare/v0.7.0...v0.8.0
+channels = ["conda-forge", "pytorch"]
All packages found in conda-forge will not be taken from pytorch.pytorch = { version="*", channel="pytorch"}
pixi run <TABTAB>
pixi run docs
!pixi run
for bash
and zsh
by @ruben-arts in https://github.com/prefix-dev/pixi/pull/390python = { version = "*" channel="conda-forge" }
by @ruben-arts in https://github.com/prefix-dev/pixi/pull/439project.version
as optional field in the pixi.toml
by @ruben-arts in https://github.com/prefix-dev/pixi/pull/400pixi.toml
to help users find errors by @ruben-arts in https://github.com/prefix-dev/pixi/pull/396install.sh
to create dot file if not present by @humphd in https://github.com/prefix-dev/pixi/pull/408task list
by @ruben-arts in https://github.com/prefix-dev/pixi/pull/431global install
path on windows by @ruben-arts in https://github.com/prefix-dev/pixi/pull/449PIXI_BIN_PATH
use backslashes by @Hofer-Julian in https://github.com/prefix-dev/pixi/pull/442mkdocs
with all documentation by @ruben-arts in https://github.com/prefix-dev/pixi/pull/435Full Changelog: https://github.com/prefix-dev/pixi/compare/v0.6.0...v0.7.0
+This release fixes some bugs and adds the --cwd
option to the tasks.
--frozen
logic to error when there is no lockfile by @ruben-arts in https://github.com/prefix-dev/pixi/pull/373rerun
example to v0.9.1 by @ruben-arts in https://github.com/prefix-dev/pixi/pull/389--cwd
) in pixi tasks
by @ruben-arts in https://github.com/prefix-dev/pixi/pull/380Full Changelog: https://github.com/prefix-dev/pixi/compare/v0.5.0...v0.6.0
+We rebuilt pixi shell
, fixing the fact that your rc
file would overrule the environment activation.
shell
works and make activation more robust by @wolfv in https://github.com/prefix-dev/pixi/pull/316.gitignore
and .gitattributes
files by @ruben-arts in https://github.com/prefix-dev/pixi/pull/359--locked
and --frozen
to getting an up-to-date prefix by @ruben-arts in https://github.com/prefix-dev/pixi/pull/363pixi
by @ruben-arts in https://github.com/prefix-dev/pixi/pull/353 & https://github.com/prefix-dev/pixi/pull/365cargo upgrade --all --incompatible
by @wolfv in https://github.com/prefix-dev/pixi/pull/358Full Changelog: https://github.com/prefix-dev/pixi/compare/v0.4.0...v0.5.0
+This release adds the start of a new cli command pixi project
which will allow users to interact with the project configuration from the command line.
0.9.0
by @ruben-arts in https://github.com/prefix-dev/pixi/pull/350xtsci-dist
to Community.md by @HaoZeke in https://github.com/prefix-dev/pixi/pull/339ribasim
to Community.md by @Hofer-Julian in https://github.com/prefix-dev/pixi/pull/340LFortran
to Community.md by @wolfv in https://github.com/prefix-dev/pixi/pull/341pixi project channel add
subcommand by @baszalmstra and @ruben-arts in https://github.com/prefix-dev/pixi/pull/347Full Changelog: https://github.com/prefix-dev/pixi/compare/v0.3.0...v0.4.0
+This releases fixes a lot of issues encountered by the community as well as some awesome community contributions like the addition of pixi global list
and pixi global remove
.
system-requirements
are properly filtered by platform, by @ruben-arts (#299)thread 'tokio-runtime-worker' has overflowed its stack
issue, by @baszalmstra (#28)pixi global list
and pixi global remove
commands, by @cjfuller (#318)--manifest-path
must point to a pixi.toml
file, by @baszalmstra (#324)pixi search
command to search for packages, by @Wackyator. (#244)[target.win-64.tasks]
, by @ruben-arts. (#269)pixi.lock
automatically, by @spenserblack. (#265)As this is our first Semantic Versioning release, we'll change from the prototype to the developing phase, as semver describes. +A 0.x release could be anything from a new major feature to a breaking change where the 0.0.x releases will be bugfixes or small improvements.
+unix
platforms, by @baszalmstra. (#250)miette
, by @baszalmstra. (#211)aarch64-linux
, by @pavelzw. (#233)libsolv
as the default solver, by @ruben-arts. (#209)condax
in the docs, by @maresb. (#207)brew
installation instructions, by @wolfv. (#208)activation.scripts
to the pixi.toml
to configure environment activation, by @ruben-arts. (#217)pixi upload
command to upload packages to prefix.dev
, by @wolfv. (#127)pixi.toml
, by @wolfv. (#218)pixi task list
to show all tasks in the project, by @tdejager. (#228)--color
to configure the colors in the output, by @baszalmstra. (#243)pixi.toml
and .gitignore
, by @pavelzw. (#216)pixi.toml
, by @wolfv. (#220)PS1
variable when going into a pixi shell
, by @ruben-arts. (#201)pixi add
, by @baszalmstra. (#213)run
subcommand to use the deno_task_shell
for improved cross-platform functionality. More details in the Deno Task Runner documentation.info
subcommand to retrieve system-specific information understood by pixi
.[commands]
in the pixi.toml
is now called [tasks]
. (#177)pixi info
command to get more system information by @wolfv in (#158)deno_task_shell
to execute commands in pixi run
by @baszalmstra in (#173)pixi command
command to the cli by @tdejager in (#177)pixi auth
command by @wolfv in (#183)depends_on
by @tdejager in (#161)PATH
variable where it is already set by @baszalmstra in (#169)pixi run
by @tdejager in (#190)Improving the reliability is important to us, so we added an integration testing framework, we can now test as close as possible to the CLI level using cargo
.
pixi build
, allowing host-
and build-
dependencies
(#149)Fixing Windows installer build in CI. (#145)
+A new command, auth
which can be used to authenticate the host of the package channels.
+A new command, shell
which can be used to start a shell in the pixi environment of a project.
+A refactor of the install
command which is changed to global install
and the install
command now installs a pixi project if you run it in the directory.
+Platform specific dependencies using [target.linux-64.dependencies]
instead of [dependencies]
in the pixi.toml
Lots and lots of fixes and improvements to make it easier for this user, where bumping to the new version of rattler
+helped a lot.
pixi.toml
issues(#111)shell
command to use the pixi environment without pixi run
. (#116)-v, -vv, -vvv
(#118)auth
command to be able to login or logout of a host like repo.prefix.dev
if you're using private channels. (#120)pixi install
moved to pixi global install
and pixi install
became the installation of a project using the pixi.toml
(#124)When you want to show your users and contributors that they can use pixi in your repo, you can use the following badge:
+ +[![Pixi Badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json)](https://pixi.sh)
+
Customize your badge
+To further customize the look and feel of your badge,
+you can add &style=<custom-style>
at the end of the URL.
+See the documentation on shields.io for more info.
scipy
port using xtensor
conda
, mamba
, poetry
, pip
#Tool | +Installs python | +Builds packages | +Runs predefined tasks | +Has lock files builtin | +Fast | +Use without python | +
---|---|---|---|---|---|---|
Conda | +✅ | +❌ | +❌ | +❌ | +❌ | +❌ | +
Mamba | +✅ | +❌ | +❌ | +❌ | +✅ | +✅ | +
Pip | +❌ | +✅ | +❌ | +❌ | +❌ | +❌ | +
Pixi | +✅ | +🚧 | +✅ | +✅ | +✅ | +✅ | +
Poetry | +❌ | +✅ | +❌ | +✅ | +❌ | +❌ | +
pixi
#Starting with the name prefix
we iterated until we had a name that was easy to pronounce, spell and remember.
+There also wasn't a cli tool yet using that name.
+Unlike px
, pex
, pax
, etc.
+We think it sparks curiosity and fun, if you don't agree, I'm sorry, but you can always alias it to whatever you like.
pixi build
#TL;DR: It's coming we promise!
+pixi build
is going to be the subcommand that can generate a conda package out of a pixi project.
+This requires a solid build tool which we're creating with rattler-build
which will be used as a library in pixi.
You can authenticate pixi with a server like prefix.dev, a private quetz instance or anaconda.org. +Different servers use different authentication methods. +In this documentation page, we detail how you can authenticate against the different servers and where the authentication information is stored.
+Usage: pixi auth login [OPTIONS] <HOST>
+
+Arguments:
+ <HOST> The host to authenticate with (e.g. repo.prefix.dev)
+
+Options:
+ --token <TOKEN> The token to use (for authentication with prefix.dev)
+ --username <USERNAME> The username to use (for basic HTTP authentication)
+ --password <PASSWORD> The password to use (for basic HTTP authentication)
+ --conda-token <CONDA_TOKEN> The token to use on anaconda.org / quetz authentication
+ -v, --verbose... More output per occurrence
+ -q, --quiet... Less output per occurrence
+ -h, --help Print help
+
The different options are "token", "conda-token" and "username + password".
+The token variant implements a standard "Bearer Token" authentication as is used on the prefix.dev platform.
+A Bearer Token is sent with every request as an additional header of the form Authentication: Bearer <TOKEN>
.
The conda-token option is used on anaconda.org and can be used with a quetz server. With this option, the token is sent as part of the URL following this scheme: conda.anaconda.org/t/<TOKEN>/conda-forge/linux-64/...
.
The last option, username & password, are used for "Basic HTTP Authentication". This is the equivalent of adding http://user:password@myserver.com/...
. This authentication method can be configured quite easily with a reverse NGinx or Apache server and is thus commonly used in self-hosted systems.
Login to prefix.dev:
+ +Login to anaconda.org:
+ +Login to a basic HTTP secured server:
+ +The storage location for the authentication information is system-dependent. By default, pixi tries to use the keychain to store this sensitive information securely on your machine.
+On Windows, the credentials are stored in the "credentials manager". Searching for rattler
(the underlying library pixi uses) you should find any credentials stored by pixi (or other rattler-based programs).
On macOS, the passwords are stored in the keychain. To access the password, you can use the Keychain Access
program that comes pre-installed on macOS. Searching for rattler
(the underlying library pixi uses) you should find any credentials stored by pixi (or other rattler-based programs).
On Linux, one can use GNOME Keyring
(or just Keyring) to access credentials that are securely stored by libsecret
. Searching for rattler
should list all the credentials stored by pixi and other rattler-based programs.
If you run on a server with none of the aforementioned keychains available, then pixi falls back to store the credentials in an insecure JSON file.
+This JSON file is located at ~/.rattler/credentials.json
and contains the credentials.
You can use the RATTLER_AUTH_FILE
environment variable to override the default location of the credentials file.
+When this environment variable is set, it provides the only source of authentication data that is used by pixi.
E.g.
+export RATTLER_AUTH_FILE=$HOME/credentials.json
+# You can also specify the file in the command line
+pixi global install --auth-file $HOME/credentials.json ...
+
The JSON should follow the following format:
+{
+ "*.prefix.dev": {
+ "BearerToken": "your_token"
+ },
+ "otherhost.com": {
+ "BasicHTTP": {
+ "username": "your_username",
+ "password": "your_password"
+ }
+ },
+ "conda.anaconda.org": {
+ "CondaToken": "your_token"
+ }
+}
+
Note: if you use a wildcard in the host, any subdomain will match (e.g. *.prefix.dev
also matches repo.prefix.dev
).
Lastly you can set the authentication override file in the global configuration file.
+Currently, we support the following methods for authenticating against PyPI:
+.netrc
file authentication.We want to add more methods in the future, so if you have a specific method you would like to see, please let us know.
+Currently, pixi supports the uv method of authentication through the python keyring library.
+To install keyring you can use pixi global install:
+For other registries, you will need to adapt these instructions to add the right keyring backend.
+Use keyring to store your credentials e.g:
+ +Add the following configuration to your pixi manifest, making sure to include your_username@
in the URL of the registry:
After making sure you are logged in, for instance by running gcloud auth login
, add the following configuration to your pixi manifest:
After following the keyring.artifacts
instructions and making sure that keyring works correctly, add the following configuration to your pixi manifest:
Either configure your Global Config, or use the flag --pypi-keyring-provider
which can either be set to subprocess
(activated) or disabled
:
.netrc
file#pixi
allows you to access private registries securely by authenticating with credentials stored in a .netrc
file.
.netrc
file can be stored in your home directory ($HOME/.netrc
for Unix-like systems)%HOME%\_netrc
).NETRC
variable (export NETRC=/my/custom/location/.netrc
).
+ e.g export NETRC=/my/custom/location/.netrc pixi install
In the .netrc
file, you store authentication details like this:
All logic regarding the decision which dependencies can be installed from which channel is done by the instruction we give the solver.
+The actual code regarding this is in the rattler_solve
crate.
+This might however be hard to read.
+Therefore, this document will continue with simplified flow charts.
When a user defines a channel per dependency, the solver needs to know the other channels are unusable for this dependency. +
[project]
+channels = ["conda-forge", "my-channel"]
+
+[dependencies]
+packgex = { version = "*", channel = "my-channel" }
+
packagex
example, the solver will understand that the package is only available in my-channel
and will not look for it in conda-forge
.
+The flowchart of the logic that excludes all other channels:
+flowchart TD
+ A[Start] --> B[Given a Dependency]
+ B --> C{Channel Specific Dependency?}
+ C -->|Yes| D[Exclude All Other Channels for This Package]
+ C -->|No| E{Any Other Dependencies?}
+ E -->|Yes| B
+ E -->|No| F[End]
+ D --> E
+Channel priority is dictated by the order in the project.channels
array, where the first channel is the highest priority.
+For instance:
+
conda-forge
the solver will not look for it in my-channel
and your-channel
, because it tells the solver they are excluded.
+If the package is not found in conda-forge
the solver will look for it in my-channel
and if it is found there it will tell the solver to exclude your-channel
for this package.
+This diagram explains the logic:
+flowchart TD
+ A[Start] --> B[Given a Dependency]
+ B --> C{Loop Over Channels}
+ C --> D{Package in This Channel?}
+ D -->|No| C
+ D -->|Yes| E{"This the first channel
+ for this package?"}
+ E -->|Yes| F[Include Package in Candidates]
+ E -->|No| G[Exclude Package from Candidates]
+ F --> H{Any Other Channels?}
+ G --> H
+ H -->|Yes| C
+ H -->|No| I{Any Other Dependencies?}
+ I -->|No| J[End]
+ I -->|Yes| B
+This method ensures the solver only adds a package to the candidates if it's found in the highest priority channel available. +If you have 10 channels and the package is found in the 5th channel it will exclude the next 5 channels from the candidates if they also contain the package.
+A common use case is to use pytorch
with nvidia
drivers, while also needing the conda-forge
channel for the main dependencies.
+
[project]
+channels = ["nvidia/label/cuda-11.8.0", "nvidia", "conda-forge", "pytorch"]
+platforms = ["linux-64"]
+
+[dependencies]
+cuda = {version = "*", channel="nvidia/label/cuda-11.8.0"}
+pytorch = {version = "2.0.1.*", channel="pytorch"}
+torchvision = {version = "0.15.2.*", channel="pytorch"}
+pytorch-cuda = {version = "11.8.*", channel="pytorch"}
+python = "3.10.*"
+
nvidia/label/cuda-11.8.0
channel, which is actually only the cuda
package.
+Then it will get all packages from the nvidia
channel, which is a little more and some packages overlap the nvidia
and conda-forge
channel.
+Like the cuda-cudart
package, which will now only be retrieved from the nvidia
channel because of the priority logic.
Then it will get the packages from the conda-forge
channel, which is the main channel for the dependencies.
But the user only wants the pytorch packages from the pytorch
channel, which is why pytorch
is added last and the dependencies are added as channel specific dependencies.
We don't define the pytorch
channel before conda-forge
because we want to get as much as possible from the conda-forge
as the pytorch channel is not always shipping the best versions of all packages.
For example, it also ships the ffmpeg
package, but only an old version which doesn't work with the newer pytorch versions.
+Thus breaking the installation if we would skip the conda-forge
channel for ffmpeg
with the priority logic.
If you want to force a specific priority for a channel, you can use the priority
(int) key in the channel definition.
+The higher the number, the higher the priority.
+Non specified priorities are set to 0 but the index in the array still counts as a priority, where the first in the list has the highest priority.
This priority definition is mostly important for multiple environments with different channel priorities, as by default feature channels are prepended to the project channels.
+[project]
+name = "test_channel_priority"
+platforms = ["linux-64", "osx-64", "win-64", "osx-arm64"]
+channels = ["conda-forge"]
+
+[feature.a]
+channels = ["nvidia"]
+
+[feature.b]
+channels = [ "pytorch", {channel = "nvidia", priority = 1}]
+
+[feature.c]
+channels = [ "pytorch", {channel = "nvidia", priority = -1}]
+
+[environments]
+a = ["a"]
+b = ["b"]
+c = ["c"]
+
a
, b
, c
, and the default environment.
+Which will have the following channel order:
+Environment | +Resulting Channels order | +
---|---|
default | +conda-forge |
+
a | +nvidia , conda-forge |
+
b | +nvidia , pytorch , conda-forge |
+
c | +pytorch , conda-forge , nvidia |
+
pixi info
Using pixi info
you can check the priority of the channels in the environment.
+
pixi info
+Environments
+------------
+ Environment: default
+ Features: default
+ Channels: conda-forge
+Dependency count: 0
+Target platforms: linux-64
+
+ Environment: a
+ Features: a, default
+ Channels: nvidia, conda-forge
+Dependency count: 0
+Target platforms: linux-64
+
+ Environment: b
+ Features: b, default
+ Channels: nvidia, pytorch, conda-forge
+Dependency count: 0
+Target platforms: linux-64
+
+ Environment: c
+ Features: c, default
+ Channels: pytorch, conda-forge, nvidia
+Dependency count: 0
+Target platforms: linux-64
+
pixi info
prints out useful information to debug a situation or to get an overview of your machine/project.
+This information can also be retrieved in json
format using the --json
flag, which can be useful for programmatically reading it.
➜ pixi info
+ Pixi version: 0.13.0
+ Platform: linux-64
+ Virtual packages: __unix=0=0
+ : __linux=6.5.12=0
+ : __glibc=2.36=0
+ : __cuda=12.3=0
+ : __archspec=1=x86_64
+ Cache dir: /home/user/.cache/rattler/cache
+ Auth storage: /home/user/.rattler/credentials.json
+
+Project
+------------
+ Version: 0.13.0
+ Manifest file: /home/user/development/pixi/pixi.toml
+ Last updated: 25-01-2024 10:29:08
+
+Environments
+------------
+default
+ Features: default
+ Channels: conda-forge
+ Dependency count: 10
+ Dependencies: pre-commit, rust, openssl, pkg-config, git, mkdocs, mkdocs-material, pillow, cairosvg, compilers
+ Target platforms: linux-64, osx-arm64, win-64, osx-64
+ Tasks: docs, test-all, test, build, lint, install, build-docs
+
The first part of the info output is information that is always available and tells you what pixi can read on your machine.
+This defines the platform you're currently on according to pixi. +If this is incorrect, please file an issue on the pixi repo.
+The virtual packages that pixi can find on your machine.
+In the Conda ecosystem, you can depend on virtual packages.
+These packages aren't real dependencies that are going to be installed, but rather are being used in the solve step to find if a package can be installed on the machine.
+A simple example: When a package depends on Cuda drivers being present on the host machine it can do that by depending on the __cuda
virtual package.
+In that case, if pixi cannot find the __cuda
virtual package on your machine the installation will fail.
The directory where pixi stores its cache. +Checkout the cache documentation for more information.
+Check the authentication documentation
+[requires --extended
]
The size of the previously mentioned "Cache dir" in Mebibytes.
+Everything below Project
is info about the project you're currently in.
+This info is only available if your path has a manifest file.
The path to the manifest file that describes the project.
+The last time the lock file was updated, either manually or by pixi itself.
+The environment info defined per environment. If you don't have any environments defined, this will only show the default
environment.
This lists which features are enabled in the environment.
+For the default this is only default
The list of channels used in this environment.
+The amount of dependencies defined that are defined for this environment (not the amount of installed dependencies).
+The list of dependencies defined for this environment.
+The platforms the project has defined.
+ + + + + + + + + + + + + + + + +We created prefix-dev/setup-pixi to facilitate using pixi in CI.
+- uses: prefix-dev/setup-pixi@v0.8.0
+ with:
+ pixi-version: v0.39.2
+ cache: true
+ auth-host: prefix.dev
+ auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
+- run: pixi run test
+
Pin your action versions
+Since pixi is not yet stable, the API of this action may change between minor versions.
+Please pin the versions of this action to a specific version (i.e., prefix-dev/setup-pixi@v0.8.0
) to avoid breaking changes.
+You can automatically update the version of this action by using Dependabot.
Put the following in your .github/dependabot.yml
file to enable Dependabot for your GitHub Actions:
version: 2
+updates:
+ - package-ecosystem: github-actions
+ directory: /
+ schedule:
+ interval: monthly # (1)!
+ groups:
+ dependencies:
+ patterns:
+ - "*"
+
daily
, weekly
To see all available input arguments, see the action.yml
file in setup-pixi
.
+The most important features are described below.
The action supports caching of the pixi environment.
+By default, caching is enabled if a pixi.lock
file is present.
+It will then use the pixi.lock
file to generate a hash of the environment and cache it.
+If the cache is hit, the action will skip the installation and use the cached environment.
+You can specify the behavior by setting the cache
input argument.
Customize your cache key
+If you need to customize your cache-key, you can use the cache-key
input argument.
+This will be the prefix of the cache key. The full cache key will be <cache-key><conda-arch>-<hash>
.
Only save caches on main
In order to not exceed the 10 GB cache size limit as fast, you might want to restrict when the cache is saved.
+This can be done by setting the cache-write
argument.
With pixi, you can create multiple environments for different requirements.
+You can also specify which environment(s) you want to install by setting the environments
input argument.
+This will install all environments that are specified and cache them.
[project]
+name = "my-package"
+channels = ["conda-forge"]
+platforms = ["linux-64"]
+
+[dependencies]
+python = ">=3.11"
+pip = "*"
+polars = ">=0.14.24,<0.21"
+
+[feature.py311.dependencies]
+python = "3.11.*"
+[feature.py312.dependencies]
+python = "3.12.*"
+
+[environments]
+py311 = ["py311"]
+py312 = ["py312"]
+
The following example will install the py311
and py312
environments in different jobs.
test:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ environment: [py311, py312]
+ steps:
+ - uses: actions/checkout@v4
+ - uses: prefix-dev/setup-pixi@v0.8.0
+ with:
+ environments: ${{ matrix.environment }}
+
The following example will install both the py311
and the py312
environment on the runner.
- uses: prefix-dev/setup-pixi@v0.8.0
+ with:
+ environments: >- # (1)!
+ py311
+ py312
+- run: |
+ pixi run -e py311 test
+ pixi run -e py312 test
+
separated by spaces, equivalent to
+ +Caching behavior if you don't specify environments
+If you don't specify any environment, the default
environment will be installed and cached, even if you use other environments.
There are currently three ways to authenticate with pixi:
+For more information, see Authentication.
+Handle secrets with care
+Please only store sensitive information using GitHub secrets. Do not store them in your repository.
+When your sensitive information is stored in a GitHub secret, you can access it using the ${{ secrets.SECRET_NAME }}
syntax.
+These secrets will always be masked in the logs.
Specify the token using the auth-token
input argument.
+This form of authentication (bearer token in the request headers) is mainly used at prefix.dev.
- uses: prefix-dev/setup-pixi@v0.8.0
+ with:
+ auth-host: prefix.dev
+ auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
+
Specify the username and password using the auth-username
and auth-password
input arguments.
+This form of authentication (HTTP Basic Auth) is used in some enterprise environments with artifactory for example.
- uses: prefix-dev/setup-pixi@v0.8.0
+ with:
+ auth-host: custom-artifactory.com
+ auth-username: ${{ secrets.PIXI_USERNAME }}
+ auth-password: ${{ secrets.PIXI_PASSWORD }}
+
Specify the conda-token using the conda-token
input argument.
+This form of authentication (token is encoded in URL: https://my-quetz-instance.com/t/<token>/get/custom-channel
) is used at anaconda.org or with quetz instances.
- uses: prefix-dev/setup-pixi@v0.8.0
+ with:
+ auth-host: anaconda.org # (1)!
+ conda-token: ${{ secrets.CONDA_TOKEN }}
+
setup-pixi
allows you to run command inside of the pixi environment by specifying a custom shell wrapper with shell: pixi run bash -e {0}
.
+This can be useful if you want to run commands inside of the pixi environment, but don't want to use the pixi run
command for each command.
You can even run Python scripts like this:
+ +If you want to use PowerShell, you need to specify -Command
as well.
- run: | # (1)!
+ python --version | Select-String "3.11"
+ shell: pixi run pwsh -Command {0} # pwsh works on all platforms
+
How does it work under the hood?
+Under the hood, the shell: xyz {0}
option is implemented by creating a temporary script file and calling xyz
with that script file as an argument.
+This file does not have the executable bit set, so you cannot use shell: pixi run {0}
directly but instead have to use shell: pixi run bash {0}
.
+There are some custom shells provided by GitHub that have slightly different behavior, see jobs.<job_id>.steps[*].shell
in the documentation.
+See the official documentation and ADR 0277 for more information about how the shell:
input works in GitHub Actions.
pixi exec
#With pixi exec
, you can also run a one-off command inside a temporary pixi environment.
- run: | # (1)!
+ import ruamel.yaml
+ # ...
+ shell: pixi exec --spec python=3.11.* --spec ruamel.yaml -- python {0}
+
See here for more information about pixi exec
.
Instead of using a custom shell wrapper, you can also make all pixi-installed binaries available to subsequent steps by "activating" the installed environment in the currently running job.
+To this end, setup-pixi
adds all environment variables set when executing pixi run
to $GITHUB_ENV
and, similarly, adds all path modifications to $GITHUB_PATH
.
+As a result, all installed binaries can be accessed without having to call pixi run
.
If you are installing multiple environments, you will need to specify the name of the environment that you want to be activated.
+- uses: prefix-dev/setup-pixi@v0.8.0
+ with:
+ environments: >-
+ py311
+ py312
+ activate-environment: py311
+
Activating an environment may be more useful than using a custom shell wrapper as it allows non-shell based steps to access binaries on the path. +However, be aware that this option augments the environment of your job.
+--frozen
and --locked
#You can specify whether setup-pixi
should run pixi install --frozen
or pixi install --locked
depending on the frozen
or the locked
input argument.
+See the official documentation for more information about the --frozen
and --locked
flags.
If you don't specify anything, the default behavior is to run pixi install --locked
if a pixi.lock
file is present and pixi install
otherwise.
There are two types of debug logging that you can enable.
+The first one is the debug logging of the action itself. +This can be enabled by for the action by re-running the action in debug mode:
++
+Debug logging documentation
+For more information about debug logging in GitHub Actions, see the official documentation.
+The second type is the debug logging of the pixi executable.
+This can be specified by setting the log-level
input.
q
, default
, v
, vv
, or vvv
.If nothing is specified, log-level
will default to default
or vv
depending on if debug logging is enabled for the action.
On self-hosted runners, it may happen that some files are persisted between jobs.
+This can lead to problems or secrets getting leaked between job runs.
+To avoid this, you can use the post-cleanup
input to specify the post cleanup behavior of the action (i.e., what happens after all your commands have been executed).
If you set post-cleanup
to true
, the action will delete the following files:
.pixi
environment~/.rattler
If nothing is specified, post-cleanup
will default to true
.
On self-hosted runners, you also might want to alter the default pixi install location to a temporary location. You can use pixi-bin-path: ${{ runner.temp }}/bin/pixi
to do this.
- uses: prefix-dev/setup-pixi@v0.8.0
+ with:
+ post-cleanup: true
+ pixi-bin-path: ${{ runner.temp }}/bin/pixi # (1)!
+
${{ runner.temp }}\Scripts\pixi.exe
on WindowsYou can also use a preinstalled local version of pixi on the runner by not setting any of the pixi-version
,
+pixi-url
or pixi-bin-path
inputs. This action will then try to find a local version of pixi in the runner's PATH.
pyproject.toml
as a manifest file for pixi.#setup-pixi
will automatically pick up the pyproject.toml
if it contains a [tool.pixi.project]
section and no pixi.toml
.
+This can be overwritten by setting the manifest-path
input argument.
If you want to see more examples, you can take a look at the GitHub Workflows of the setup-pixi
repository.
You can bring pixi projects into production by either containerizing it using tools like Docker or by using quantco/pixi-pack
.
We provide a simple docker image at pixi-docker
that contains the pixi executable on top of different base images.
The images are available on ghcr.io/prefix-dev/pixi.
+There are different tags for different base images available:
+latest
- based on ubuntu:jammy
focal
- based on ubuntu:focal
bullseye
- based on debian:bullseye
jammy-cuda-12.2.2
- based on nvidia/cuda:12.2.2-jammy
All tags
+For all tags, take a look at the build script.
+The following example uses the pixi docker image as a base image for a multi-stage build.
+It also makes use of pixi shell-hook
to not rely on pixi being installed in the production container.
More examples
+For more examples, take a look at pavelzw/pixi-docker-example.
+FROM ghcr.io/prefix-dev/pixi:0.39.2 AS build
+
+# copy source code, pixi.toml and pixi.lock to the container
+WORKDIR /app
+COPY . .
+# install dependencies to `/app/.pixi/envs/prod`
+# use `--locked` to ensure the lockfile is up to date with pixi.toml
+RUN pixi install --locked -e prod
+# create the shell-hook bash script to activate the environment
+RUN pixi shell-hook -e prod -s bash > /shell-hook
+RUN echo "#!/bin/bash" > /app/entrypoint.sh
+RUN cat /shell-hook >> /app/entrypoint.sh
+# extend the shell-hook script to run the command passed to the container
+RUN echo 'exec "$@"' >> /app/entrypoint.sh
+
+FROM ubuntu:24.04 AS production
+WORKDIR /app
+# only copy the production environment into prod container
+# please note that the "prefix" (path) needs to stay the same as in the build container
+COPY --from=build /app/.pixi/envs/prod /app/.pixi/envs/prod
+COPY --from=build --chmod=0755 /app/entrypoint.sh /app/entrypoint.sh
+# copy your project code into the container as well
+COPY ./my_project /app/my_project
+
+EXPOSE 8000
+ENTRYPOINT [ "/app/entrypoint.sh" ]
+# run your app inside the pixi environment
+CMD [ "uvicorn", "my_project:app", "--host", "0.0.0.0" ]
+
pixi-pack
is a simple tool that takes a pixi environment and packs it into a compressed archive that can be shipped to the target machine.
It can be installed via
+ +Or by downloading our pre-built binaries from the releases page.
+Instead of installing pixi-pack globally, you can also use pixi exec to run pixi-pack
in a temporary environment:
+
+You can pack an environment with
+ +This will create a environment.tar
file that contains all conda packages required to create the environment.
# environment.tar
+| pixi-pack.json
+| environment.yml
+| channel
+| ├── noarch
+| | ├── tzdata-2024a-h0c530f3_0.conda
+| | ├── ...
+| | └── repodata.json
+| └── linux-64
+| ├── ca-certificates-2024.2.2-hbcca054_0.conda
+| ├── ...
+| └── repodata.json
+
With pixi-pack unpack environment.tar
, you can unpack the environment on your target system. This will create a new conda environment in ./env
that contains all packages specified in your pixi.toml
. It also creates an activate.sh
(or activate.bat
on Windows) file that lets you activate the environment without needing to have conda
or micromamba
installed.
Since pixi-pack
just downloads the .conda
and .tar.bz2
files from the conda repositories, you can trivially create packs for different platforms.
You can only unpack a pack on a system that has the same platform as the pack was created for.
+You can inject additional packages into the environment that are not specified in pixi.lock
by using the --inject
flag:
This can be particularly useful if you build the project itself and want to include the built package in the environment but still want to use pixi.lock
from the project.
If you don't have pixi-pack
available on your target system, you can still install the environment if you have conda
or micromamba
available.
+Just unarchive the environment.tar
, then you have a local channel on your system where all necessary packages are available.
+Next to this local channel, you will find an environment.yml
file that contains the environment specification.
+You can then install the environment using conda
or micromamba
:
tar -xvf environment.tar
+micromamba create -p ./env --file environment.yml
+# or
+conda env create -p ./env --file environment.yml
+
The environment.yml
and repodata.json
files are only for this use case, pixi-pack unpack
does not use them.
pyproject.toml
in pixi#We support the use of the pyproject.toml
as our manifest file in pixi.
+This allows the user to keep one file with all configuration.
+The pyproject.toml
file is a standard for Python projects.
+We don't advise to use the pyproject.toml
file for anything else than python projects, the pixi.toml
is better suited for other types of projects.
pyproject.toml
file#When you already have a pyproject.toml
file in your project, you can run pixi init
in a that folder. Pixi will automatically
[tool.pixi.project]
section to the file, with the platform and channel information required by pixi;.gitignore
and .gitattributes
files.If you do not have an existing pyproject.toml
file , you can run pixi init --format pyproject
in your project folder. In that case, pixi will create a pyproject.toml
manifest from scratch with some sane defaults.
The pyproject.toml
file supports the requires_python
field.
+Pixi understands that field and automatically adds the version to the dependencies.
This is an example of a pyproject.toml
file with the requires_python
field, which will be used as the python dependency:
[project]
+name = "my_project"
+requires-python = ">=3.9"
+
+[tool.pixi.project]
+channels = ["conda-forge"]
+platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"]
+
Which is equivalent to:
+[project]
+name = "my_project"
+channels = ["conda-forge"]
+platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"]
+
+[dependencies]
+python = ">=3.9"
+
The pyproject.toml
file supports the dependencies
field.
+Pixi understands that field and automatically adds the dependencies to the project as [pypi-dependencies]
.
This is an example of a pyproject.toml
file with the dependencies
field:
[project]
+name = "my_project"
+requires-python = ">=3.9"
+dependencies = [
+ "numpy",
+ "pandas",
+ "matplotlib",
+]
+
+[tool.pixi.project]
+channels = ["conda-forge"]
+platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"]
+
Which is equivalent to:
+[project]
+name = "my_project"
+channels = ["conda-forge"]
+platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"]
+
+[pypi-dependencies]
+numpy = "*"
+pandas = "*"
+matplotlib = "*"
+
+[dependencies]
+python = ">=3.9"
+
You can overwrite these with conda dependencies by adding them to the dependencies
field:
[project]
+name = "my_project"
+requires-python = ">=3.9"
+dependencies = [
+ "numpy",
+ "pandas",
+ "matplotlib",
+]
+
+[tool.pixi.project]
+channels = ["conda-forge"]
+platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"]
+
+[tool.pixi.dependencies]
+numpy = "*"
+pandas = "*"
+matplotlib = "*"
+
This would result in the conda dependencies being installed and the pypi dependencies being ignored. +As pixi takes the conda dependencies over the pypi dependencies.
+If your python project includes groups of optional dependencies, pixi will automatically interpret them as pixi features of the same name with the associated pypi-dependencies
.
You can add them to pixi environments manually, or use pixi init
to setup the project, which will create one environment per feature. Self-references to other groups of optional dependencies are also handled.
For instance, imagine you have a project folder with a pyproject.toml
file similar to:
[project]
+name = "my_project"
+dependencies = ["package1"]
+
+[project.optional-dependencies]
+test = ["pytest"]
+all = ["package2","my_project[test]"]
+
Running pixi init
in that project folder will transform the pyproject.toml
file into:
[project]
+name = "my_project"
+dependencies = ["package1"]
+
+[project.optional-dependencies]
+test = ["pytest"]
+all = ["package2","my_project[test]"]
+
+[tool.pixi.project]
+channels = ["conda-forge"]
+platforms = ["linux-64"] # if executed on linux
+
+[tool.pixi.environments]
+default = {features = [], solve-group = "default"}
+test = {features = ["test"], solve-group = "default"}
+all = {features = ["all", "test"], solve-group = "default"}
+
In this example, three environments will be created by pixi:
+All environments will be solved together, as indicated by the common solve-group
, and added to the lock file. You can edit the [tool.pixi.environments]
section manually to adapt it to your use case (e.g. if you do not need a particular environment).
If your python project includes dependency groups, pixi will automatically interpret them as pixi features of the same name with the associated pypi-dependencies
.
You can add them to pixi environments manually, or use pixi init
to setup the project, which will create one environment per dependency group.
For instance, imagine you have a project folder with a pyproject.toml
file similar to:
[project]
+name = "my_project"
+dependencies = ["package1"]
+
+[dependency-groups]
+test = ["pytest"]
+docs = ["sphinx"]
+dev = [{include-group = "test"}, {include-group = "docs"}]
+
Running pixi init
in that project folder will transform the pyproject.toml
file into:
[project]
+name = "my_project"
+dependencies = ["package1"]
+
+[dependency-groups]
+test = ["pytest"]
+docs = ["sphinx"]
+dev = [{include-group = "test"}, {include-group = "docs"}]
+
+[tool.pixi.project]
+channels = ["conda-forge"]
+platforms = ["linux-64"] # if executed on linux
+
+[tool.pixi.environments]
+default = {features = [], solve-group = "default"}
+test = {features = ["test"], solve-group = "default"}
+docs = {features = ["docs"], solve-group = "default"}
+dev = {features = ["dev"], solve-group = "default"}
+
In this example, four environments will be created by pixi:
+All environments will be solved together, as indicated by the common solve-group
, and added to the lock file. You can edit the [tool.pixi.environments]
section manually to adapt it to your use case (e.g. if you do not need a particular environment).
As the pyproject.toml
file supports the full pixi spec with [tool.pixi]
prepended an example would look like this:
[project]
+name = "my_project"
+requires-python = ">=3.9"
+dependencies = [
+ "numpy",
+ "pandas",
+ "matplotlib",
+ "ruff",
+]
+
+[tool.pixi.project]
+channels = ["conda-forge"]
+platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"]
+
+[tool.pixi.dependencies]
+compilers = "*"
+cmake = "*"
+
+[tool.pixi.tasks]
+start = "python my_project/main.py"
+lint = "ruff lint"
+
+[tool.pixi.system-requirements]
+cuda = "11.0"
+
+[tool.pixi.feature.test.dependencies]
+pytest = "*"
+
+[tool.pixi.feature.test.tasks]
+test = "pytest"
+
+[tool.pixi.environments]
+test = ["test"]
+
The pyproject.toml
file normally contains a [build-system]
section. Pixi will use this section to build and install the project if it is added as a pypi path dependency.
If the pyproject.toml
file does not contain any [build-system]
section, pixi will fall back to uv's default, which is equivalent to the below:
[build-system]
+requires = ["setuptools >= 40.8.0"]
+build-backend = "setuptools.build_meta:__legacy__"
+
Including a [build-system]
section is highly recommended. If you are not sure of the build-backend you want to use, including the [build-system]
section below in your pyproject.toml
is a good starting point.
+pixi init --format pyproject
defaults to hatchling
.
+The advantages of hatchling
over setuptools
are outlined on its website.
You can leverage GitHub Actions in combination with pavelzw/pixi-diff-to-markdown +to automatically update your lockfiles similar to dependabot or renovate in other ecosystems.
++
+Dependabot/Renovate support for pixi
+You can track native Dependabot support for pixi in dependabot/dependabot-core #2227 +and for Renovate in renovatebot/renovate #2213.
+To get started, create a new GitHub Actions workflow file in your repository.
+name: Update lockfiles
+
+permissions: # (1)!
+ contents: write
+ pull-requests: write
+
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: 0 5 1 * * # (2)!
+
+jobs:
+ pixi-update:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up pixi
+ uses: prefix-dev/setup-pixi@v0.8.1
+ with:
+ run-install: false
+ - name: Update lockfiles
+ run: |
+ set -o pipefail
+ pixi update --json | pixi exec pixi-diff-to-markdown >> diff.md
+ - name: Create pull request
+ uses: peter-evans/create-pull-request@v7
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ commit-message: Update pixi lockfile
+ title: Update pixi lockfile
+ body-path: diff.md
+ branch: update-pixi
+ base: main
+ labels: pixi
+ delete-branch: true
+ add-paths: pixi.lock
+
peter-evans/create-pull-request
In order for this workflow to work, you need to set "Allow GitHub Actions to create and approve pull requests" to true in your repository settings (in "Actions" -> "General").
+Tip
+If you don't have any pypi-dependencies
, you can use pixi update --json --no-install
to speed up diff generation.
+
+In order to prevent accidental recursive GitHub Workflow runs, GitHub decided to not trigger any workflows on automated PRs when using the default GITHUB_TOKEN
.
+There are a couple of ways how to work around this limitation. You can find excellent documentation for this in peter-evans/create-pull-request
, see here.
You can customize the summary by either using command-line-arguments of pixi-diff-to-markdown
or by specifying the configuration in pixi.toml
under [tool.pixi-diff-to-markdown]
. See the pixi-diff-to-markdown documentation or run pixi-diff-to-markdown --help
for more information.
If you want to use the same workflow in multiple repositories in your GitHub organization, you can create a reusable workflow. +You can find more information in the GitHub documentation.
+ + + + + + + + + + + + + + + + +