問題描述
Python 的 easy_install
使得安裝新包非常方便.但是,據(jù)我所知,它沒有實現(xiàn)依賴管理器的其他常見功能 - 列出和刪除已安裝的包.
Python's easy_install
makes installing new packages extremely convenient. However, as far as I can tell, it doesn't implement the other common features of a dependency manager - listing and removing installed packages.
找出已安裝內(nèi)容的最佳方法是什么,以及刪除已安裝軟件包的首選方法是什么?如果我手動刪除軟件包(例如通過 rm/usr/local/lib/python2.6/dist-packages/my_installed_pkg.egg
或類似方式),是否有任何文件需要更新?
What is the best way of finding out what's installed, and what is the preferred way of removing installed packages? Are there any files that need to be updated if I remove packages manually (e.g. by rm /usr/local/lib/python2.6/dist-packages/my_installed_pkg.egg
or similar)?
推薦答案
pip,一個替代 setuptools/easy_install,提供卸載"命令.
pip, an alternative to setuptools/easy_install, provides an "uninstall" command.
根據(jù)安裝說明安裝pip:
$ wget https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py
然后你可以使用 pip uninstall
來移除使用 easy_install
Then you can use pip uninstall
to remove packages installed with easy_install
這篇關(guān)于如何刪除使用 Python 的 easy_install 安裝的軟件包?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!