将这些包准备成列表:
pip uninstall <list of requirement> -y
e.g.:
pip uninstall termcolor, imgviz, matplotlib, PyYAML, qtpy, Pillow, colorama, PyQt5, numpy -y
(Some version of pip require to remove commas, s. below)
pip uninstall termcolor imgviz matplotlib -y
例如:使用pip卸载带有依赖关系的软件包,需要三个步骤:
- 显示依赖列表
- 删除软件包
- 删除其依赖项列表(从1中复制)
详细步骤:
1. pip show <package>
e.g.:
pip show labelme
...
Requires: termcolor, imgviz, matplotlib, PyYAML, qtpy, Pillow, colorama, PyQt5, numpy
...
2. pip uninstall <package>
e.g.
pip uninstall labelme
3. pip uninstall <list of requirement> -y
e.g.:
pip uninstall termcolor, imgviz, matplotlib, PyYAML, qtpy, Pillow, colorama, PyQt5, numpy -y