要使用Python的pip工具強制卸載一個包,請遵循以下步驟:
pip uninstall --yes package_name
例如,如果要卸載名為“sample-package”的軟件包,請輸入:
pip uninstall --yes sample-package
通過添加--yes選項,您告訴pip您確定要卸載該軟件包,無需進一步確認。
--yes