Skip to content

Declare pip runtime dependency#5468

Open
JamBalaya56562 wants to merge 1 commit into
platformio:developfrom
JamBalaya56562:codex/fix-pip-runtime-dependency
Open

Declare pip runtime dependency#5468
JamBalaya56562 wants to merge 1 commit into
platformio:developfrom
JamBalaya56562:codex/fix-pip-runtime-dependency

Conversation

@JamBalaya56562

Copy link
Copy Markdown

Summary

  • declare pip as a PlatformIO Python dependency so pipx/uvx/uv tool environments install it explicitly
  • remove the duplicate hard-coded pip upgrade target from upgrade_pip_dependencies()
  • add focused tests for the dependency list and upgrade command construction

Root cause

PlatformIO invokes python -m pip at runtime for tool/Python package installation, but pip was not listed in get_pip_dependencies(). Isolated runners such as pipx, uvx, and uv tool install only install declared dependencies, so those environments can omit the pip module and fail with No module named pip.

Fixes #5418.
Related to #5305.

Validation

  • C:\Users\Jam\AppData\Local\mise\installs\uv\0.11.26\uv.exe run --with pytest --with-editable . -- python -m pytest tests/misc/test_dependencies.py
  • C:\Users\Jam\AppData\Local\mise\installs\uv\0.11.26\uv.exe run --with-editable . -- python -c "import importlib.metadata as md; reqs=md.requires('platformio') or []; print([r for r in reqs if r == 'pip']); print(len(reqs))"
  • mise exec uv@0.11.26 -- uv run --with pytest --with-editable . -- python -m pytest tests/misc/test_dependencies.py

@CLAassistant

CLAassistant commented Jul 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PlatformIO fails in pipx/uvx environments — pip not declared as a dependency

2 participants