Skip to content

Tools: Simplify the installation of python3-venv#32754

Merged
peterbarker merged 1 commit into
ArduPilot:masterfrom
cclauss:Tools-simplify-the-use-of-python3-venv
Apr 14, 2026
Merged

Tools: Simplify the installation of python3-venv#32754
peterbarker merged 1 commit into
ArduPilot:masterfrom
cclauss:Tools-simplify-the-use-of-python3-venv

Conversation

@cclauss

@cclauss cclauss commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Summary

python3-venv works on all currently supported Debian and Ubuntu distros, so let's simplify the installation logic.

Classification & Testing (check all that apply and add your own)

  • Checked by a human programmer
  • Non-functional change
  • No-binary change
  • Infrastructure change (e.g. unit tests, helper scripts)
  • Automated test(s) verify changes (e.g. unit test, autotest)
  • Tested manually, description below (e.g. SITL)
  • Tested on hardware
  • Logs attached
  • Logs available on request

Description

ubuntu:jammy and debian:bullseye also work the same way. Should we change them as well?

Also,

pip install -U can be quite opaque to readers because pip install currently has six --u* options, including --user.

pip install --upgrade makes the intention clearer in code that others will read.

% python3 -m pip install --help | grep "\-\-u"

  --user                      Install to the Python user install directory for
  -U, --upgrade               Upgrade all specified packages to the newest
  --upgrade-strategy <upgrade_strategy>
  --use-pep517                Use PEP 517 for building source distributions
  --use-feature <feature>     Enable new functionality, that may be backward
  --use-deprecated <feature>  Enable deprecated functionality, that will be

% python3 -m pip install --help | grep "\-\-f"

  --force-reinstall           Reinstall all packages even if they are already
                              at --find-links URLs
  -f, --find-links <url>      If a URL or path to an html file, then parse for

How was this tested?

% docker run -it ubuntu:noble

# apt update && \
    DEBIAN_FRONTEND=noninteractive apt install --yes lsb-release python3-venv && \
    lsb_release -ds && \
    python3 -m venv --upgrade-deps .venv && \
    source .venv/bin/activate && 
    python -V && \
    pip -V



Ubuntu 24.04.4 LTS
Python 3.12.3
pip 26.0.1 from /.venv/lib/python3.12/site-packages/pip (python 3.12)

% docker run -it debian:bookworm

Debian GNU/Linux 12 (bookworm)
Python 3.11.2
pip 26.0.1 from /.venv/lib/python3.11/site-packages/pip (python 3.11)

% docker run -it ubuntu:jammy

Ubuntu 22.04.5 LTS
Python 3.10.12
pip 26.0.1 from /.venv/lib/python3.10/site-packages/pip (python 3.10)

% docker run -it debian:bullseye

Debian GNU/Linux 11 (bullseye)
Python 3.9.2
pip 26.0.1 from /.venv/lib/python3.9/site-packages/pip (python 3.9)

Note

This month, Plucky will probably disappear from https://ports.ubuntu.com/ubuntu-ports/dists

@cclauss cclauss force-pushed the Tools-simplify-the-use-of-python3-venv branch from 28af0f5 to 4bb2509 Compare April 13, 2026 06:17
@Hwurzburg Hwurzburg requested a review from peterbarker April 13, 2026 11:35
@cclauss cclauss changed the title Tools: Simplify the installation of python3-venv Tools: Simplify the installation of python3-venv Apr 13, 2026

@Ryanf55 Ryanf55 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual tests look good, nice.

@peterbarker peterbarker merged commit 2edf9e2 into ArduPilot:master Apr 14, 2026
18 checks passed
@cclauss cclauss deleted the Tools-simplify-the-use-of-python3-venv branch April 14, 2026 11:13
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.

3 participants