$ pip3 list --outdated --format=freeze
ERROR: List format 'freeze' can not be used with the --outdated option.
Doc says otherwise – pip list - pip documentation v22.3
What would be the equivalent of
pip3 list --outdated --format=freeze in pip 22.3 and newer?
A PR for a doc update would be welcomed.
From the changelog
Remove the ability to use
pip list --outdated in combination with
this change was made in issue 9789. In that issue, I provide an alternative:
Actually, if you want the output @matrixise expects, the following gives it:
> py -m pip list --outdated --format=json | jq -r '. | .name+\"=\"+.latest_version'
(excuse Powershell quoting rules, for Unix probably just omit the backslashes).
(But note that as per the discussion in the issue, this does not provide a list of requirements that will necessarily “upgrade everything” the way you would expect. See the issue for details).
So on mac, this works:
python3 -m pip list --outdated --format=json | jq -r '. | "\(.name)==\(.latest_version)"' | xargs -n1 pip3 install -U