Update All Outdated Modules/Packages using pip3


If you want to update all the Python Modules/Packages at once to the latest version available, you can make use of the pip-review module.

Step 1: Get the list of all packages that need update

# pip-review

certifi==2023.7.22 is available (you have 2023.5.7)
fastjsonschema==2.18.0 is available (you have 2.17.1)
nbconvert==7.7.2 is available (you have 7.7.1)
notebook==7.0.0 is available (you have 6.5.4)
setuptools==68.0.0 is available (you have 65.5.0)
urllib3==2.0.4 is available (you have 2.0.3)

Step 2: Update all packages

Let's update all packages in interactive mode, where you will be prompted to ask do you need to update each outdated package.

% pip-review --local --interactive
certifi==2023.7.22 is available (you have 2023.5.7)
Upgrade now? [Y]es, [N]o, [A]ll, [Q]uit Y
fastjsonschema==2.18.0 is available (you have 2.17.1)
Upgrade now? [Y]es, [N]o, [A]ll, [Q]uit (y) y
nbconvert==7.7.2 is available (you have 7.7.1)
Upgrade now? [Y]es, [N]o, [A]ll, [Q]uit (y) y
notebook==7.0.0 is available (you have 6.5.4)
Upgrade now? [Y]es, [N]o, [A]ll, [Q]uit (y) y
setuptools==68.0.0 is available (you have 65.5.0)
Upgrade now? [Y]es, [N]o, [A]ll, [Q]uit (y) y
urllib3==2.0.4 is available (you have 2.0.3)
Upgrade now? [Y]es, [N]o, [A]ll, [Q]uit (y) y

If you want to do this automatically, you can try the auto flag.

% pip-review --local --auto
Update All Outdated PIP Modules Packages
-

Facing issues? Have Questions? Post them here! I am happy to answer!


Author Info:

Rakesh (He/Him) is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap