pixi-kernel


Namepixi-kernel JSON
Version 0.6.5 PyPI version JSON
download
home_pageNone
SummaryJupyter kernels using Pixi for reproducible notebooks
upload_time2025-07-30 01:05:56
maintainerNone
docs_urlNone
authorNone
requires_python<4.0,>=3.9
licenseMIT
keywords jupyter jupyterlab jupyterlab-extension kernel pixi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pixi kernel

[![image](https://img.shields.io/pypi/v/pixi-kernel)](https://pypi.python.org/pypi/pixi-kernel)
[![image](https://img.shields.io/pypi/l/pixi-kernel)](https://pypi.python.org/pypi/pixi-kernel)
[![image](https://img.shields.io/pypi/pyversions/pixi-kernel)](https://pypi.python.org/pypi/pixi-kernel)
[![Actions status](https://github.com/renan-r-santos/pixi-kernel/actions/workflows/ci.yml/badge.svg)](https://github.com/renan-r-santos/pixi-kernel/actions)
[![codecov](https://codecov.io/gh/renan-r-santos/pixi-kernel/graph/badge.svg?token=7PCsXpsYSH)](https://codecov.io/gh/renan-r-santos/pixi-kernel)
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

Per-directory Pixi environments with multi-language Jupyter kernels.

<!--- TODO: add theme selector when supported on PyPI https://github.com/pypi/warehouse/issues/11251 -->

![JupyterLab launcher screen showing Pixi kernel](https://raw.githubusercontent.com/renan-r-santos/pixi-kernel/main/assets/launch-light.png)

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](#kernel-support) table and replace `ipykernel` with the desired kernel package.

1. Install Pixi and `pixi-kernel` alongside JupyterLab using your favorite package manager.
2. Restart JupyterLab.
3. Create a new directory and initialize a Pixi project with `pixi init` and `pixi add ipykernel`.
4. Select the Python Pixi kernel and you are good to go.

See the [Pixi docs](https://pixi.sh/latest/) 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:

1. Use `shutil.which("pixi")` to find Pixi in your PATH
2. Check for a configuration file stored at:
   - Linux/macOS: `$HOME/.config/pixi-kernel/config.toml`
   - Windows: `$Env:USERPROFILE\.config\pixi-kernel\config.toml`
3. Check the default Pixi installation location:
   - Linux/macOS: `$HOME/.pixi/bin/pixi`
   - Windows: `$Env:USERPROFILE\.pixi\bin\pixi.exe`

If you have Pixi installed in a non-standard location, you can create a configuration file to
specify its path:

```toml
pixi-path = "/path/to/your/pixi"
```

## Kernel support

Pixi kernel supports the following kernels:

| Language | Kernel         | Package name                                       |
| -------- | -------------- | -------------------------------------------------- |
| Python   | IPython Kernel | [ipykernel](https://github.com/ipython/ipykernel)  |
| R        | IR Kernel      | [r-irkernel](https://github.com/IRkernel/IRkernel) |

Support for other kernels and languages can be added by opening an issue or a pull request, see
[CONTRIBUTING](CONTRIBUTING.md#adding-support-for-new-kernels).

## 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.

![JupyterLab property inspector showing Pixi environment selector](https://raw.githubusercontent.com/renan-r-santos/pixi-kernel/main/assets/env-selector-light.png)

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:

1. Install `pixi-kernel` locally: `pip install pixi-kernel --user`
2. Install Pixi
3. 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

- [Pyproject Local Jupyter Kernel](https://github.com/bluss/pyproject-local-kernel)
- [Poetry-kernel](https://github.com/pathbird/poetry-kernel)
- [Python Local .venv Kernel](https://github.com/goerz/python-localvenv-kernel)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pixi-kernel",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "jupyter, jupyterlab, jupyterlab-extension, kernel, pixi",
    "author": null,
    "author_email": "Renan Rodrigues dos Santos <renan.engmec@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/6e/95/5e25860c3f0c388efc8a66c37d65fccaee7842131dd977f54650fb8db9dd/pixi_kernel-0.6.5.tar.gz",
    "platform": null,
    "description": "# Pixi kernel\n\n[![image](https://img.shields.io/pypi/v/pixi-kernel)](https://pypi.python.org/pypi/pixi-kernel)\n[![image](https://img.shields.io/pypi/l/pixi-kernel)](https://pypi.python.org/pypi/pixi-kernel)\n[![image](https://img.shields.io/pypi/pyversions/pixi-kernel)](https://pypi.python.org/pypi/pixi-kernel)\n[![Actions status](https://github.com/renan-r-santos/pixi-kernel/actions/workflows/ci.yml/badge.svg)](https://github.com/renan-r-santos/pixi-kernel/actions)\n[![codecov](https://codecov.io/gh/renan-r-santos/pixi-kernel/graph/badge.svg?token=7PCsXpsYSH)](https://codecov.io/gh/renan-r-santos/pixi-kernel)\n[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\nPer-directory Pixi environments with multi-language Jupyter kernels.\n\n<!--- TODO: add theme selector when supported on PyPI https://github.com/pypi/warehouse/issues/11251 -->\n\n![JupyterLab launcher screen showing Pixi kernel](https://raw.githubusercontent.com/renan-r-santos/pixi-kernel/main/assets/launch-light.png)\n\nPixi kernel supports Jupyterlab 4, Python 3.9+ and Pixi 0.39.0+ using `pyproject.toml` and\n`pixi.toml` configurations.\n\n**Disclaimer**: _This project is not affiliated with Pixi, and not an official Pixi plugin._\n\n## Quick Start\n\nThis assumes you want a Python kernel. For other languages, check the [Kernel\nsupport](#kernel-support) table and replace `ipykernel` with the desired kernel package.\n\n1. Install Pixi and `pixi-kernel` alongside JupyterLab using your favorite package manager.\n2. Restart JupyterLab.\n3. Create a new directory and initialize a Pixi project with `pixi init` and `pixi add ipykernel`.\n4. Select the Python Pixi kernel and you are good to go.\n\nSee the [Pixi docs](https://pixi.sh/latest/) for more information on how to use Pixi.\n\n## Configuration\n\n### Custom Pixi binary location\n\nBy default, `pixi-kernel` will try to find the Pixi binary in this order:\n\n1. Use `shutil.which(\"pixi\")` to find Pixi in your PATH\n2. Check for a configuration file stored at:\n   - Linux/macOS: `$HOME/.config/pixi-kernel/config.toml`\n   - Windows: `$Env:USERPROFILE\\.config\\pixi-kernel\\config.toml`\n3. Check the default Pixi installation location:\n   - Linux/macOS: `$HOME/.pixi/bin/pixi`\n   - Windows: `$Env:USERPROFILE\\.pixi\\bin\\pixi.exe`\n\nIf you have Pixi installed in a non-standard location, you can create a configuration file to\nspecify its path:\n\n```toml\npixi-path = \"/path/to/your/pixi\"\n```\n\n## Kernel support\n\nPixi kernel supports the following kernels:\n\n| Language | Kernel         | Package name                                       |\n| -------- | -------------- | -------------------------------------------------- |\n| Python   | IPython Kernel | [ipykernel](https://github.com/ipython/ipykernel)  |\n| R        | IR Kernel      | [r-irkernel](https://github.com/IRkernel/IRkernel) |\n\nSupport for other kernels and languages can be added by opening an issue or a pull request, see\n[CONTRIBUTING](CONTRIBUTING.md#adding-support-for-new-kernels).\n\n## Pixi environments\n\nPixi kernel supports multiple Pixi environments in a single Pixi project. To select a specific\nenvironment, use JupyterLab property inspector, save your notebook and restart your kernel.\n\n![JupyterLab property inspector showing Pixi environment selector](https://raw.githubusercontent.com/renan-r-santos/pixi-kernel/main/assets/env-selector-light.png)\n\nIf an environment cannot be determined, Pixi kernel will fallback to the value in the\n`PIXI_KERNEL_DEFAULT_ENVIRONMENT` environment variable, if specified. Otherwise, the `default` Pixi\nenvironment will be used.\n\n## JupyterHub deployments with limited permissions\n\nIf you're using pixi-kernel on JupyterHub and cannot access the environment where JupyterLab is\ninstalled, you can use the following workaround:\n\n1. Install `pixi-kernel` locally: `pip install pixi-kernel --user`\n2. Install Pixi\n3. Restart your JupyterLab server\n\nSee https://github.com/renan-r-santos/pixi-kernel/issues/62 and\nhttps://github.com/renan-r-santos/pixi-kernel/issues/51 for more information.\n\n## Limitations\n\nPixi kernel only works with the default environment in VSCode.\n\n## Related\n\n- [Pyproject Local Jupyter Kernel](https://github.com/bluss/pyproject-local-kernel)\n- [Poetry-kernel](https://github.com/pathbird/poetry-kernel)\n- [Python Local .venv Kernel](https://github.com/goerz/python-localvenv-kernel)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Jupyter kernels using Pixi for reproducible notebooks",
    "version": "0.6.5",
    "project_urls": {
        "Documentation": "https://github.com/renan-r-santos/pixi-kernel",
        "Homepage": "https://github.com/renan-r-santos/pixi-kernel",
        "Repository": "https://github.com/renan-r-santos/pixi-kernel"
    },
    "split_keywords": [
        "jupyter",
        " jupyterlab",
        " jupyterlab-extension",
        " kernel",
        " pixi"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e7f24843925b62abade7c937d6c1a3d7ec6ade1768c6b9a6ddd2fbced2208630",
                "md5": "caca0e23c3e826024dd70cda02640db7",
                "sha256": "954a1f9875f19c1e133bca3569fbe8202db05387661344352e325cdfe512ccc8"
            },
            "downloads": -1,
            "filename": "pixi_kernel-0.6.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "caca0e23c3e826024dd70cda02640db7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 38979,
            "upload_time": "2025-07-30T01:05:55",
            "upload_time_iso_8601": "2025-07-30T01:05:55.181960Z",
            "url": "https://files.pythonhosted.org/packages/e7/f2/4843925b62abade7c937d6c1a3d7ec6ade1768c6b9a6ddd2fbced2208630/pixi_kernel-0.6.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6e955e25860c3f0c388efc8a66c37d65fccaee7842131dd977f54650fb8db9dd",
                "md5": "1deb683b3c0220a0e4b39a42159d7e17",
                "sha256": "4ee12b9d28b638fa7e1f5a1101a64846a3d3eab256adb70b9830121052d78eb1"
            },
            "downloads": -1,
            "filename": "pixi_kernel-0.6.5.tar.gz",
            "has_sig": false,
            "md5_digest": "1deb683b3c0220a0e4b39a42159d7e17",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 709811,
            "upload_time": "2025-07-30T01:05:56",
            "upload_time_iso_8601": "2025-07-30T01:05:56.812407Z",
            "url": "https://files.pythonhosted.org/packages/6e/95/5e25860c3f0c388efc8a66c37d65fccaee7842131dd977f54650fb8db9dd/pixi_kernel-0.6.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-30 01:05:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "renan-r-santos",
    "github_project": "pixi-kernel",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pixi-kernel"
}
        
Elapsed time: 1.14009s