How to Upgrade all ‘pip’ modules at once?

Jatin Sharma
3 min readOct 3, 2020

--

In this article I’ll give you the basic guide to update your all pip modules to the latest version at once. So, let’s Start –

Step-1

First Run this command in your terminal/powershell/cmd as shown in the image.

pip list –o

Step-2

After this command You will get the lists of the outdated module of pip (as shown in the previous image). Now you just have to select all the modules and copy it with the versions.

Step-3

Now just create a normal txt file on your desktop, you can call it anything but most probably programmer use “requirements.txt” because it sounds cool. And paste all the text you have copied in that txt file.

Step-4

Now remove the previous version column (2nd column). And make a file shows in the image, which will have modules name =(equal sign) then module latest version then save that file.

Step-5

Now open teminal/powershell/cmd in desktop mode (e.g. C:\user\Desktop\) if your text file in diffrent directory then open terminal in that directory.

Then type the given command

pip install -r requirements.txt

If your text file have some different name than replace “requirements” with you filename E.g

pip install -r filename.txt

After running this command now your computer will install latest versions of all modules one by one non-stop and it’ll uninstall previous version as well.

Note: The terminal should have to open in the same directory as the text file.

If you are not satisfied with the answer then comment you views.

--

--

Jatin Sharma

React developer | Python | C++ | Competitive Programmer