Skip to content

Commit

Permalink
Remove PIXI_IN_SHELL env var before calling pixi
Browse files Browse the repository at this point in the history
  • Loading branch information
renan-r-santos committed Nov 29, 2024
1 parent 9188ea9 commit b6c8097
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pixi_kernel/pixi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import os
import shutil
import subprocess
from pathlib import Path
Expand Down Expand Up @@ -63,6 +64,10 @@ def ensure_readiness(*, cwd: Path, required_package: str, kernel_name: str) -> E
PIXI_OUTDATED.format(kernel_name=kernel_name, minimum_version=MINIMUM_PIXI_VERSION)
)

# Remove PIXI_IN_SHELL for when JupyterLab was started from a Pixi shell
# https://github.com/renan-r-santos/pixi-kernel/issues/35
os.environ.pop("PIXI_IN_SHELL", None)

# Ensure there is a Pixi project in the current working directory or any of its parents
result = subprocess.run(
["pixi", "info", "--json"],
Expand Down

0 comments on commit b6c8097

Please sign in to comment.