一次性升级python依赖包
升级pip
python -m pip install --upgrade pip
- 使用配置好的requirements文件
pip freeze>requirements.txt
pip install -r requirements.txt
2.直接搜索当前有新版本的包,一键升级
# -*- coding: utf-8 -*-
import pip
from subprocess import call
from pip._internal.utils.misc import get_installed_distributions
from time import sleep
call("pip show pip")
# call("