赞
踩
#查看更新
pip list --outdated
#更新某个包
pip install --upgrade <packages-name>
pip install pip-review
# 下面语句逐个弹出是否确认某个库需要更新
pip-review --local --interactive
import pip
from subprocess import call
from pip._internal.utils.misc import get_installed_distributions
for dist in get_installed_distributions():
call("pip install --upgrade " + dist.project_name, shell=True)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。