pypa / pip

The Python package installer
https://pip.pypa.io/
MIT License
9.46k stars 3k forks source link

[Feature Request] pip upgrade all packages in one command #12112

Closed osalbahr closed 1 year ago

osalbahr commented 1 year ago

What's the problem this feature will solve?

Upgrading all packages using pip often involves using hack-y pipes that involve grep or awk, often breaking for some edge cases.

Describe the solution you'd like

pip install --upgrade --all
pip install -U -a

Alternative Solutions

I've tried the workarounds in https://stackoverflow.com/questions/2720014/how-to-upgrade-all-python-packages-with-pip. The pip-review workaround seems to be the best option. However, a built-in way would be cleaner.

Additional context

Some packages, like hyfetch, are not available via dnf. I opted to use pip inside of a Fedora distrobox since pip is the supported method to install hyfetch. Having a way to keep all pip packages up to date would be useful in keeping my whole system up to date.

[zeus@fedora ~]$ neofetch
             .',;::::;,'.                zeus@fedora 
         .';:cccccccccccc:;,.            ----------- 
      .;cccccccccccccccccccccc;.         OS: Fedora Linux 38.20230626.0 (Silverblue) x86_64 
    .:cccccccccccccccccccccccccc:.       Host: Predator G3-571 V1.22 
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Kernel: 6.3.8-200.fc38.x86_64 
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Uptime: 1 hour, 55 mins 
.:ccccccccccccc;KMMc;cc;xMMc;ccccccc:.   Packages: 1513 (rpm), 38 (flatpak) 
,cccccccccccccc;MMM.;cc;;WW:;cccccccc,   Shell: bash 5.2.15 
:cccccccccccccc;MMM.;cccccccccccccccc:   Resolution: 1920x1080 
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   DE: GNOME 44.2 (wayland) 
cccccc;0MMKxdd:;MMMkddc.;cccccccccccc;   WM: Mutter 
ccccc;XM0';cccc;MMM.;cccccccccccccccc'   WM Theme: Adwaita 
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;    Theme: Adwaita [GTK2/3] 
ccccc;0MNc.ccc.xMMd;ccccccccccccccc;     Icons: Adwaita [GTK2/3] 
cccccc;dNMWXXXWM0:;cccccccccccccc:,      Terminal: gnome-terminal 
cccccccc;.:odl:.;cccccccccccccc:,.       CPU: Intel i7-7700HQ (8) @ 2.800GHz 
:cccccccccccccccccccccccccccc:'.         GPU: Intel HD Graphics 630 
.:cccccccccccccccccccccc:;,..            GPU: NVIDIA GeForce GTX 1060 Mobile 
  '::cccccccccccccc::;,.                 Memory: 5487.89 MiB / 15861.20 MiB 

[zeus@fedora ~]$ distrobox list
ID           | NAME                 | STATUS                         | IMAGE                         
4cc62ff374db | fedora               | Up 20 minutes                  | registry.fedoraproject.org/fedora-toolbox:latest
[zeus@fedora ~]$ rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run 55min ago
Deployments:
...
● ostree-unverified-registry:ghcr.io/ublue-os/silverblue-nvidia:latest
                   Digest: sha256:43aa9a55021f847803dd66cade2bf5147e5d16f520cee30d73bad150e303b369
                  Version: 38.20230626.0 (2023-06-26T18:04:45Z)
...

Code of Conduct

uranusjr commented 1 year ago

Duplicate of #4551