有没有办法用pip卸载多个软件包? [英] Is there a way to uninstall multiple packages with pip?
问题描述
我正在尝试删除所有已安装的带有"pyobjc-framework"前缀的软件包.我尝试了以下方法:
I am attempting to remove all of the installed "pyobjc-framework"-prefixed packages. I have tried the following:
% pip freeze | grep pyobjc-framework | xargs pip uninstall
但此举令人沮丧,因为每次卸载pip都需要确认(也许可以通过一种绕过此方法的解决方案).
but this barfs because each pip uninstall requires confirmation (perhaps a way to bypass this would be a solution).
请帮助,然后我必须分解并手动卸载每一个!没有人想要.
Please help before I have to break down and uninstall each of these manually! Nobody wants that.
推荐答案
如果将-y | --yes
标志添加到pip:-)
Your command should actually work if you add the -y | --yes
flag to pip :-)
-y,-是,不要求您确认卸载删除.
-y, --yes Don't ask for confirmation of uninstall deletions.
可能:
% pip freeze | grep pyobjc-framework | xargs pip uninstall -y
这篇关于有没有办法用pip卸载多个软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!