------------------pip批量更新库--------------------
1)查看过期的库
pip list --outdated
更新单一的库:
pip install --upgrade 库名
批量升级更新所有过期的库
import pip
from pip._internal.utils.misc import get_installed_distributions
from subprocess import call
for dist in get_installed_distributions():
call("pip install --upgrade " + dist.project_name, shell=True)
Anaconda批量更新库
更新所有的库
conda update -all
更新Anaconda
conda update conda