Fork me on GitHub

青禹小生

雁驰万里却作禽,鱼未得水空有鳞。 花开花落花不语,昨是昨非昨亦今。

导航

批量更新python库

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)

 

posted on 2017-10-09 17:48  司徒道  阅读(608)  评论(4编辑  收藏  举报