Basic Setup
JupyterLab will open in your browser, ready to use with all dependencies from your Pixi environment.A complete example is available in the Pixi repository.
Adding Scientific Packages
Install additional packages for data science and visualization:Available Kernels
JupyterLab supports multiple programming languages through kernels. Install additional kernels from conda-forge:Bash Kernel
C++ Kernels
- xeus-cpp - C++ kernel based on clang-repl
- xeus-cling - C++ kernel based on Cling
Other Language Kernels
- xeus-lua - Lua kernel
- xeus-sql - SQL kernel for database queries
- r-irkernel - R kernel for statistical computing
Advanced Usage: Per-Directory Environments
Usepixi-kernel to run a single JupyterLab instance while using different Pixi environments for different notebooks.
Installation
How It Works
pixi-kernel automatically searches for a manifest file (pixi.toml or pyproject.toml) in:
- The notebook’s directory
- Any parent directory
Example Structure
Configuration Examples
Data Science Environment
pixi.toml
Multi-Language Environment
pixi.toml
Machine Learning Environment
pixi.toml
JupyterLab Extensions
Install useful JupyterLab extensions:Best Practices
Lock Dependencies
Commit
pixi.lock to ensure all collaborators use identical package versions.Separate Environments
Use
pixi-kernel to isolate project dependencies while sharing JupyterLab.Version Control Notebooks
Use
nbstripout to remove notebook outputs before committing:Task Shortcuts
Define tasks in
pixi.toml for common commands:Working with Remote Servers
Run JupyterLab on a remote server and connect from your local machine:On Remote Server
On Local Machine
http://localhost:8888 in your local browser.
Jupyter Notebook vs JupyterLab
Both interfaces work with Pixi:Troubleshooting
Kernel Not Found
Ensure the kernel package is installed:Import Errors
Verify the package is in your Pixi environment:Port Already in Use
Specify a different port:pixi-kernel Not Working
Check that apixi.toml or pyproject.toml exists in the notebook’s directory or a parent directory.