pip删除所有安装的库
时间: 2023-08-26 11:08:51 浏览: 124
Python pip 安装与使用(安装、更新、删除)
要删除所有已安装的库,可以使用以下命令:
pip freeze | xargs pip uninstall -y
这个命令会先使用pip freeze列出所有已安装的库,并通过管道将它们传递给pip uninstall命令进行卸载。选项"-y"表示自动确认卸载操作,无需手动确认每个库的卸载。这样,所有已安装的库都会被删除。\[1\]
#### 引用[.reference_title]
- *1* *3* [安装(python、pip、常用三方库)](https://blog.csdn.net/weixin_43617170/article/details/130618400)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [删除pip下载的所有第三方库,最快的方法,没有之一](https://blog.csdn.net/weixin_42321517/article/details/127930048)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文