Skip to content

[bug] the launcher cannot install anything from an interpreter without pip #582

Closed

Description

@cdeust

What happened

The launcher installs every dependency with sys.executable -m pip (scripts/launcher_pip.py::_pip_command). When the interpreter running the launcher has no pip module, every install fails at once:

[cortex-launcher] dependency install failed:
  .../.venv/bin/python: No module named pip

A virtual environment created by uv venv (and python -m venv --without-pip) has no pip by design, so a user who launches Cortex from such an interpreter cannot install the plugin's private deps/ at all. The failure is reported through the normal path and no success stamp is written, so nothing is corrupted, but nothing installs either.

Measured on 2026-09-16 on the maintainer's machine, Python 3.13.7 in a uv venv: the 11 tests of tests_py/scripts/test_installer_rerun_keeps_entries.py (6) and tests_py/scripts/test_installer_upgrade_single_version.py (5) error in setup with that message, because they call scripts/launcher_deps.py with sys.executable. Under a Homebrew Python 3.14.4, which has pip, the same tests pass.

Expected behavior

The launcher installs with the pip that ships with the standard library when the interpreter has no pip module. CPython bundles a pip wheel for ensurepip (ensurepip/_bundled/pip-*.whl), and that wheel can be run in place without installing anything:

$ .venv/bin/python -c "import ensurepip, pathlib; print(pathlib.Path(ensurepip.__file__).parent / '_bundled')"
$ .venv/bin/python <that dir>/pip-25.2-py3-none-any.whl/pip --version
pip 25.2 from .../ensurepip/_bundled/pip-25.2-py3-none-any.whl/pip (python 3.13)

When an interpreter has neither pip nor a bundled wheel (Debian's python3-minimal removes ensurepip), the launcher should say so by name instead of reporting No module named pip.

Evidence required to close

The two installer test files passing in a pip-less virtual environment, and a test that pins the resolution order: installed pip first, bundled wheel second, a named error third.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions