Identifying and Updating Outdated Packages
00:00 Another benefit of using a package manager is that you can keep your packages and dependencies up to date. Pip can identify outdated packages that have new versions available and then also upgrade them to the latest version.
00:13 Let me show you how that works now. I am going to set up some kind of demo scenario we can work with here. So what I am going to do is I am going to install an older version of the Requests library so that we can then go ahead and upgrade it.
So I just installed Requests 2.0 which is an older version of Requests at this moment. What I am going to do next is I am going to ask pip to identify outdated packages; you can do that with the familiar
pip list command, and by adding a
--outdated switch to it.
00:54 So when I run this, it tells me exactly which packages that I have currently installed are outdated and what the latest version is. So in this case, I can tell that there is a newer version of Requests available.
Become a Member to join the conversation.