pip 更新库

pip 更新库_第1张图片

来自:http://www.cnblogs.com/luckjun/p/4958338.html


pip:

python

import pip

from subprocess import call

for dist in pip.get_installed_distributions():

    call("sudo pip install --upgrade "+dist.project_name, shell=True)

pip3:

python3

import pip

from subprocess import call

for dist in pip.get_installed_distributions():

    call("sudo pip3 install --upgrade "+dist.project_name, shell=True)

你可能感兴趣的:(pip 更新库)