Overview¶
Pixi is a modern Python package management tool, replacing / improving on conda and mamba.
Installation, Update and Uninstall¶
Follow the instructions on: https://
The installation script will add Pixi to the path.
Update¶
pixi self-updateUninstall¶
pixi clean cache
# remove environments from pixi workspaces
cd path/to_workspace
pixi clean
# remove pixi executable
rm -r ~/.pixi
# remove pixi binary from `PATH`
...Setup¶
Global environments¶
pixi global install \
--environment data-science \
--expose ds-python=python \
pandas polars geopandas statsmodels \
scikit-learn lightgbm xgboost catboost \
matplotlib seaborn plotly streamlit \
pydantic openpyxl fastexcel ipykernel ipywidgets tqdmJupyter Lab¶
Detailed instructions how to setup a global JupyterLab installation: README.md
Workspaces¶
Workspaces enable reproducible environments inside a folder (e.g. root of a Git repository).
# Create workspace inside existing folder:
pixi init
# Create workspace in a new folder
pixi init my_new_projectAdding dependencies¶
pixi add polars pytest
# add package from PyPI instead of conda-forge:
pixi add --pypi geopy
# add local editable package as pypi dependency:
pixi add --pypi "project @ file:///absolute/path/to/project" --editable
# add package from github as pypi dependency:
pixi add --git https://github.com/username/my_package.git my_package --pypiUpdate workspace environment¶
pixi update --dry-run # preview
pixi updatepixi.lock¶
Commit and track pixi.lock if you want reproduce the exact environment.
Rebuild environment from lockfile:
pixi clean # removes workspace environment under .pixi
pixi install --locked # recreates environment from lockfile