How do I uninstall a Python module (“egg”) that I installed with easy_install?
Asked Answered
S

2

28

I’ve installed a couple of Python modules using easy_install. How do I uninstall them?

I couldn’t see an uninstall option listed in easy_install --help.

Sansculotte answered 5/12, 2010 at 13:13 Comment(1)
Duplicate of #1232188 where there is more information.Stillborn
S
30

Ah, here we go:

$ easy_install -m PackageName

$ rm EggFile

I’m not exactly clear what the -m option does, but this method seems to work for me (i.e. after doing it, I can no longer import the modules in my Python interpreter).

Sansculotte answered 5/12, 2010 at 13:15 Comment(4)
You're not removing the egg entirely though. easy_install doesn't support uninstalling, a package manager does, and installing into a virtualenv lets you remove the whole virtualenv.Quantitative
@Tobu: aha, I wondered whether it got rid of everything. Do you know what easy_install leaves behind? Have you got an example of a package manager?Sansculotte
To understand what -m does see #4306110. And deleting the egg zip file or unzipped directory plus -m deletes just about everything. In addition, you'll need to delete any console scripts that were installed. If necessary, you can find any by reinstalling the package and noting the locations that easy_install tells you.Externalism
What it leaves behind varies (scripts, egg-info, data come to mind), the problem is that nothing is tracked. On linux, consider checkinstall as the cheapest way to build a package.Quantitative
C
2

easy_install did work for me.

I also was able to test that easy_install -m short name worked. For example:

easy_install -m mesos # ( short for mesos-0.16.0-py2.6-linux-x86_64.egg)

pip uninstall mesos also ending up working with short name.

Campbellbannerman answered 4/6, 2014 at 15:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.