1. 程式人生 > >批量更新python庫

批量更新python庫

ins distrib spa 批量更新 () blog all pre style

1 import pip
2 from subprocess import call
3 
4 for dist in pip.get_installed_distributions():
5     try:
6         call("pip install --upgrade " + dist.project_name, shell=True)
7     except Exception as e:
8         print(e)

批量更新python庫