pip安装更新有3种办法
1. 直接安装
pip list --outdated pip install --upgrade 模块名
2. Python代码中实现
import pip from subprocess import call for dist in pip.get_installed_distributions(): call("pip install --upgrade " + dist,project_name, shell=True)
3.利用pip-review
pip install pip-review pip-review --local --interactive
pip模块自身的更新
pip uninstall pip easy_install pip
时间: 2024-10-25 05:36:06