使用pip升级所有package笔记

以root权限运行该脚本:

import pip
from subprocess import call

for dist in pip.get_installed_distributions():
    call("pip install --upgrade " + dist.project_name, shell=True)


你可能感兴趣的:(Linux,Python,pip,upgrade)