pip 查看已安装的库、批量更新库
2020-04-08 本文已影响0人
fukeru
1、查看安装的库
pip list或者pip freeze
2、查看过时的库
pip list --outdated
3、批量更新的Python脚本
import pip
from subprocess import call
for dist in pip.get_installed_distributions():
call("sudo pip install --upgrade " + dist.project_name, shell=True)
4、更新pip
pip install --upgrade pip