Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions scripts/start_tour.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ def _resolve_python() -> str:
"""
exe = sys.executable
if exe:
# Prefer the unresolved path first — resolving symlinks can escape
# a virtual-env and point at the system Python, which on modern
# Homebrew / PEP 668 installs will refuse ``pip install``.
if Path(exe).exists():
return exe
resolved = str(Path(exe).resolve())
if Path(resolved).exists():
return resolved
if Path(exe).exists():
return exe
for name in ("python3", "python"):
found = shutil.which(name)
if found:
Expand Down