原文:点击查原文
1.查询所有过期库
(1) 打开命令提示符cmd
(2) pip list --outdated
2.批量升级过期库(通过循环来实现逐个升级)
(1) 打开idle
(2) 进入Python 3.x Shell
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)
![在这里插入图片描述](https://img-blog.csdnimg.cn/20200626212005682.png)