HOST_PY, INSPECTOR, KERNEL_PACKAGES((3, 11),
('dhrishti',),
('ipykernel', 'ipymini', 'kernmini', 'fastcore', 'microio'))
Check and install kernel support in a selected Python environment.
KERNEL_PACKAGES lists the required distributions. as_installed adds versions from the host environment.
((3, 11),
('dhrishti',),
('ipykernel', 'ipymini', 'kernmini', 'fastcore', 'microio'))
cwd as a string, falling back to a writable directory when the process inherited / or a read-only bundle.
work_dir returns a supplied directory as text. A missing directory uses the current working directory.
The sys.path entries bootstrap_src hands a kernel to borrow from.
support_paths returns existing absolute import paths. Relative and missing paths are excluded.
Each interpreter path has one shared probe lock.
_run always returns returncode, stdout, and stderr. Process-start failures become a non-zero result.
(127, "[Errno 2] No such file or directory: '/definitely/not/a/python'")
_last_line returns the last non-empty line, or an empty string.
'ImportError: numpy ABI'
A module probe returns available, version, and error.
{'available': True, 'version': '1.2', 'error': ''}
Importability of both supported kernel launchers in python.
kernel_support probes both kernel launchers in the selected interpreter.
({'available': True, 'version': '0.1.21', 'error': ''},
{'available': False,
'version': '',
'error': "[Errno 2] No such file or directory: '/definitely/not/a/python'"})
Check whether python can import the live-variable inspector, returning what blocked it if not.
inspector_support caches one result per interpreter for INSPECTOR_TTL seconds. import_failure recognizes a missing or broken inspector import.
{'available': False,
'version': '',
'error': "ModuleNotFoundError: No module named 'dhrishti'"}
Whether anything may install into python. Never this one, and never inside a signed bundle.
installable rejects a missing path, the current interpreter, and interpreters inside a macOS application bundle.
Pin names to the versions this process runs; leave unpinned what it doesn’t have, so installs stay compatible with the host.
as_installed pins names to versions installed in the host process.
['fastcore==2.2.19', 'ipymini==0.1.21', 'not_a_real_package']
_attempts tries uv when available and always includes python -m pip install.
['/nowhere/bin/python', '-m', 'pip', 'install', 'ipymini==0.1.21']
_log records the command, return code, and bounded output.
Install kernel packages via uv or pip; verify the import works after, so failures name the package not the installer.
install_kernel_support succeeds only when installation completes and both launchers import.
Give python its own copy of what the inspector imports, then ask it again.
install_inspector_support installs Dhrishti and probes it again.