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