How do I remove packages installed with Python's easy

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.

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 (eg by rm /usr/local/lib/python2.6/dist-packages/my_installed_pkg.egg or similar)?


pip, an alternative to setuptools/easy_install, provides an "uninstall" command.

Install pip according to the installation instructions:

$ wget https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py

Then you can use pip uninstall to remove packages installed with easy_install


要卸载一个.egg你需要rm -rf这个蛋(它可能是一个目录)并从site-packages/easy-install.pth删除匹配的行


First you have to run this command:

$ easy_install -m [PACKAGE]

It removes all dependencies of the package.

Then remove egg file of that package:

$ sudo rm -rf /usr/local/lib/python2.X/site-packages/[PACKAGE].egg
链接地址: http://www.djcxy.com/p/25012.html

上一篇: 我如何从源代码安装R包?

下一篇: 如何删除使用Python easy安装的软件包