How to upgrade all packages using pip at once?

0 votes
I have a VM which I had installed a few years ago and there are new versions for many packages. I manually upgraded the packages I wanted to upgrade but I can’t keep doing it forever. Is there a way to upgrade all packages at once?
Jan 29 in Python by Namitha
62 views

1 answer to this question.

0 votes

pip doesn’t have a default command for this. But you can tweak a little to get this done. Here’s is one command that works:

pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 pip install -U
answered Jan 29 by Omkar
• 67,290 points

Related Questions In Python

0 votes
1 answer
0 votes
1 answer

How to install Python MySQLdb module using pip?

It's easy to do, but hard to ...READ MORE

answered Aug 20, 2018 in Python by charlie_brown
• 7,720 points
75 views
0 votes
1 answer
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 175 views
0 votes
1 answer

How to find packages installed using pip?

Yes, you can find the packages installed ...READ MORE

answered Jan 29 in Python by Omkar
• 67,290 points
48 views
+1 vote
1 answer

How to read hdfs file using python?

subprocess.Popen(["hadoop", "fs", "-cat", "/path/to/myfile"], stdout ...READ MORE

answered Dec 6, 2018 in Python by Omkar
• 67,290 points
583 views