1革屠、簡(jiǎn)述
今天閑得蛋疼在cmd下使用pip install jupyter
安裝了jupyter notebook剑逃,想研究研究沛膳,可惜用了一會(huì)兒暫時(shí)覺得對(duì)我無(wú)用,所以想卸載了它俊鱼,于是輸入命令pip unstall jupyter
刻像,哪知查詢后只是卸載了jupyter
,其依賴關(guān)系庫(kù)依然存在并闲。
百度一番沒有結(jié)果细睡,然后使用google輸入how to uninstall jupyter
就發(fā)現(xiàn)了pip-autoremove這個(gè)卸載工具:how-to-uninstall-jupyter
- 輸入
pip install pip-autoremove
安裝該工具 - 輸入
pip-autoremove jupyter -y
卸載jupyter
2、擴(kuò)展
pip-aotuoremove 0.9.0介紹:
Remove a package and its unused dependencies 刪除包及其未使用的依賴關(guān)系
用法:
Usage: pip-autoremove [OPTION]... [NAME]...
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-l, --list list unused dependencies, but don't uninstall them.
-L, --leaves list leaves (packages which are not used by any others).
-y, --yes don't ask for confirmation of uninstall deletions.
用例:
Uninstall it and all its unused dependencies卸載它及其所有未使用的依賴關(guān)系:
$ pip-autoremove Flask -y
Flask 0.10.1 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
Werkzeug 0.9.6 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
Jinja2 2.7.3 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
MarkupSafe 0.23 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
itsdangerous 0.24 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
Uninstalling MarkupSafe:
Successfully uninstalled MarkupSafe
Uninstalling Jinja2:
Successfully uninstalled Jinja2
Uninstalling itsdangerous:
Successfully uninstalled itsdangerous
Uninstalling Werkzeug:
Successfully uninstalled Werkzeug
Uninstalling Flask:
Successfully uninstalled Flask
Remove multiple packages and their dependencies at once一次刪除多個(gè)包及其依賴關(guān)系:
$ pip install Flask Sphinx
...
Successfully installed Flask Sphinx Werkzeug Jinja2 itsdangerous Pygments docutils markupsafe
Cleaning up...
$ pip-autoremove Flask Sphinx -y
Sphinx 1.2.2 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
Jinja2 2.7.3 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
MarkupSafe 0.23 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
Pygments 1.6 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
docutils 0.12 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
Flask 0.10.1 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
Werkzeug 0.9.6 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
Jinja2 2.7.3 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
MarkupSafe 0.23 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
itsdangerous 0.24 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)