Python Extension
The Python extension provides first-class Pixi environment support.Install the Python Extension
Install from the VS Code Marketplace.
Automatic Detection
The extension automatically detects and selects the Pixi default environment when you open a Python file.

Features Available
- IntelliSense and code completion
- Debugging support
- Test discovery and execution
- Linting and formatting
- Jupyter notebook support
Direnv Extension
Direnv provides language-agnostic environment activation for VS Code.Install Direnv Extension
Install from the VS Code Marketplace.
Configure Direnv
Create a
.envrc file in your workspace root to enable automatic environment activation.Devcontainer Extension
Devcontainers provide consistent development environments and work seamlessly with GitHub Codespaces.Basic Setup
The
.pixi directory is mounted as a volume to avoid case-sensitivity issues on macOS and Windows. Some conda packages contain files that differ only in case.Why Use a Volume for .pixi?
Default filesystem mounts on macOS and Windows are case-insensitive, but some conda packages (like ncurses) contain files that differ only in case. Mounting.pixi as a volume solves this issue.
Adding Secrets
For private conda channels, add authentication secrets:.devcontainer/devcontainer.json
.devcontainer/Dockerfile
- Set as environment variables when starting locally
- Configured in GitHub Codespaces Settings under “Secrets”
Tasks Integration
Run Pixi tasks directly from VS Code:tasks.json Configuration
.vscode/tasks.json
Running Tasks
- Open Command Palette:
Ctrl+Shift+P/Cmd+Shift+P - Run:
Tasks: Run Task - Select your Pixi task
Launch Configuration
Debug applications in Pixi environments:.vscode/launch.json
Workspace Settings
Optimize VS Code for Pixi workspaces:.vscode/settings.json
- Sets the default Python interpreter
- Prevents auto-activation (Pixi handles this)
- Excludes
.pixifrom file watching for performance - Excludes
.pixifrom search results - Keeps
.pixivisible in the file explorer
Multi-Environment Projects
For projects with multiple Pixi environments:.vscode/settings.json
.env files:
.env.dev
.env.prod
Tips and Tricks
Auto-activate Terminal
Pixi automatically activates environments in VS Code’s integrated terminal.
Extension Sync
Use Settings Sync to share extensions and settings across machines.
Remote Development
Use Remote-SSH extension to develop on remote machines with Pixi installed.
Multiple Workspaces
Use VS Code workspaces to manage multiple Pixi projects simultaneously.
Troubleshooting
Environment Not Detected
- Reload the window:
Developer: Reload Window - Manually select interpreter via Command Palette
- Check that
.pixi/envs/defaultexists
Slow Performance
Add.pixi to watcher exclusions in settings (see Workspace Settings above).