Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Update All Packages
#1
Is it Possible to update all Installed Python packages at once using Pip? Think Think
Reply
#2
I've seen several posts that claim the following will work (I haven't tried it)
pip freeze — local | grep -v ‘^\-e’ | cut -d = -f 1 | xargs -n1 sudo pip install -U

or if admin privileges needed:
sudo pip freeze — local | grep -v ‘^\-e’ | cut -d = -f 1 | xargs -n1 sudo pip install -U
Reply
#3
Yes there is way,here some commands.
# Take look what's not updated
pip list --outdated

# Write outdated to a file
pip list --outdated --format freeze | cut --fields=1 --delimiter="="> pip_list_outdated.txt

# Upgrade all outdated
pip install --upgrade -r pip_list_outdated.txt
It can also be smart to look into virtual environments as in now build into Python trough venv.
This means that each project can have its own new dependencies then nothing is outdated.
Reply
#4
I've seen this posts also, because I was looking for a command line option for it.
There is no option or command.

I don't understand why there is no pip upgrade-safe and pip upgrade-all.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#5
I have a python script on github. it is made for updating (--user) modules.

You can customize it to your needs.

pip-upgrade-outdated-user-modules
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Python + Google Sheet | Best way to update specific cells in a single Update()? Vokofe 1 2,628 Dec-16-2020, 05:26 AM
Last Post: Vokofe
  unable to update packages russianponchik 0 1,615 Mar-29-2020, 04:18 PM
Last Post: russianponchik

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020