How to update all installed packages in Python with pip on Windows

How to update all installed packages in Python with pip on Windows

Simplest method is to use pip-review package,

  1. pip install pip-review

  2. pip-review --interactive

You can update all the packages in following way,

  1. import pkg_resources

  2. from subprocess import call

  3. packages =[dist.project_name for dist in pkg_resources.working_set]

  4. call("pip install --upgrade "+' '.join(packages), shell=True)

This method works on Windows as well.

David_Li

我还没有学会写个人说明!

暂无评论

相关推荐