Python 更新所有包
程序员文章站
2024-02-12 10:52:58
...
from subprocess import call
from pip._internal.utils.misc import get_installed_distributions # pip 10 以后没有pip.get...
for dist in get_installed_distributions():
call("pip37 install --upgrade " + dist.project_name, shell=True) # 个人自己修改 我的是pip37