查看安装的库
pip list
查看过时的库
pip list --outdated
批量更新的Python脚本
import pip from subprocess import call for dist in pip.get_installed_distributions(): call("sudo pip install --upgrade " + dist.project_name, shell=True)
时间: 2024-10-14 21:37:06
查看安装的库
pip list
查看过时的库
pip list --outdated
批量更新的Python脚本
import pip from subprocess import call for dist in pip.get_installed_distributions(): call("sudo pip install --upgrade " + dist.project_name, shell=True)