Jupyter kernels using Pixi for reproducible notebooks
Project description
Pixi kernel
Per-directory Pixi environments with multi-language Jupyter kernels.
Pixi kernel supports Jupyterlab 4, Python 3.9+ and Pixi 0.39.0+ using pyproject.toml and
pixi.toml configurations.
Disclaimer: This project is not affiliated with Pixi, and not an official Pixi plugin.
Quick Start
This assumes you want a Python kernel. For other languages, check the Kernel
support table and replace ipykernel with the desired kernel package.
- Install Pixi and
pixi-kernelalongside JupyterLab using your favorite package manager. - Restart JupyterLab.
- Create a new directory and initialize a Pixi project with
pixi initandpixi add ipykernel. - Select the Python Pixi kernel and you are good to go.
See the Pixi docs for more information on how to use Pixi.
Configuration
Custom Pixi binary location
By default, pixi-kernel will try to find the Pixi binary in this order:
- Use
shutil.which("pixi")to find Pixi in your PATH - Check for a configuration file stored at:
- Linux/macOS:
$HOME/.config/pixi-kernel/config.toml - Windows:
$Env:USERPROFILE\.config\pixi-kernel\config.toml
- Linux/macOS:
- Check the default Pixi installation location:
- Linux/macOS:
$HOME/.pixi/bin/pixi - Windows:
$Env:USERPROFILE\.pixi\bin\pixi.exe
- Linux/macOS:
If you have Pixi installed in a non-standard location, you can create a configuration file to specify its path:
pixi-path = "/path/to/your/pixi"
Kernel support
Pixi kernel supports the following kernels:
| Language | Kernel | Package name |
|---|---|---|
| Python | IPython Kernel | ipykernel |
| R | IR Kernel | r-irkernel |
| R | Ark R Kernel | ark |
Pixi environments
Pixi kernel supports multiple Pixi environments in a single Pixi project. To select a specific environment, use JupyterLab property inspector, save your notebook and restart your kernel.
If an environment cannot be determined, Pixi kernel will fallback to the value in the
PIXI_KERNEL_DEFAULT_ENVIRONMENT environment variable, if specified. Otherwise, the default Pixi
environment will be used.
JupyterHub deployments with limited permissions
If you're using pixi-kernel on JupyterHub and cannot access the environment where JupyterLab is installed, you can use the following workaround:
- Install
pixi-kernellocally:pip install pixi-kernel --user - Install Pixi
- Restart your JupyterLab server
See https://github.com/renan-r-santos/pixi-kernel/issues/62 and https://github.com/renan-r-santos/pixi-kernel/issues/51 for more information.
Limitations
Pixi kernel only works with the default environment in VSCode.
Related
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pixi_kernel-0.7.1.tar.gz.
File metadata
- Download URL: pixi_kernel-0.7.1.tar.gz
- Upload date:
- Size: 714.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8788c9f07e24397576947771ef81fc3cb58d374e245939bf4f5a4a827edaf1f
|
|
| MD5 |
ce86607b486b2220b96f97c2dedf466a
|
|
| BLAKE2b-256 |
57329cd86c46272ce0c10cfe9dbf1966afbd8faa4452c9ba97974977b2fe6572
|
Provenance
The following attestation bundles were made for pixi_kernel-0.7.1.tar.gz:
Publisher:
release.yml on renan-r-santos/pixi-kernel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pixi_kernel-0.7.1.tar.gz -
Subject digest:
b8788c9f07e24397576947771ef81fc3cb58d374e245939bf4f5a4a827edaf1f - Sigstore transparency entry: 725399797
- Sigstore integration time:
-
Permalink:
renan-r-santos/pixi-kernel@a49bbac08482c77fc8d7c04fc87b8db1213db2ed -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/renan-r-santos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a49bbac08482c77fc8d7c04fc87b8db1213db2ed -
Trigger Event:
push
-
Statement type:
File details
Details for the file pixi_kernel-0.7.1-py3-none-any.whl.
File metadata
- Download URL: pixi_kernel-0.7.1-py3-none-any.whl
- Upload date:
- Size: 45.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93b51c8a95ca58fb4b743cb2ce5d73b951f467e7c39b0c766f20e05bdf950478
|
|
| MD5 |
1d423ccf6af8e393c07ff254d031c8ba
|
|
| BLAKE2b-256 |
c436ce5f75aa7c736a663a901766edc3580098c7ea3959a0e878363a54a3714e
|
Provenance
The following attestation bundles were made for pixi_kernel-0.7.1-py3-none-any.whl:
Publisher:
release.yml on renan-r-santos/pixi-kernel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pixi_kernel-0.7.1-py3-none-any.whl -
Subject digest:
93b51c8a95ca58fb4b743cb2ce5d73b951f467e7c39b0c766f20e05bdf950478 - Sigstore transparency entry: 725399799
- Sigstore integration time:
-
Permalink:
renan-r-santos/pixi-kernel@a49bbac08482c77fc8d7c04fc87b8db1213db2ed -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/renan-r-santos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a49bbac08482c77fc8d7c04fc87b8db1213db2ed -
Trigger Event:
push
-
Statement type: