如何卸载使用 easy_install 安装的 Python 模块(“egg”)?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4358958/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I uninstall a Python module (“egg”) that I installed with easy_install?
提问by Paul D. Waite
I've installed a couple of Python modules using easy_install. How do I uninstall them?
我已经使用easy_install安装了几个 Python 模块。我如何卸载它们?
I couldn't see an uninstall option listed in easy_install --help.
我看不到 中列出的卸载选项easy_install --help。
采纳答案by Paul D. Waite
Ah, here we go:
啊,我们来了:
$ easy_install -m PackageName
$ rm EggFile
I'm not exactly clear what the -moption does, but this method seems to work for me (i.e. after doing it, I can no longer importthe modules in my Python interpreter).
我不太清楚该-m选项的作用,但这种方法似乎对我有用(即在执行此操作后,我无法再import使用 Python 解释器中的模块)。
回答by bma398
easy_installdid work for me.
easy_install确实为我工作。
I also was able to test that easy_install -mshort name worked. For example:
我还能够测试该easy_install -m短名称是否有效。例如:
easy_install -m mesos # ( short for mesos-0.16.0-py2.6-linux-x86_64.egg)
pip uninstall mesosalso ending up working with short name.
pip uninstall mesos也最终使用短名称。

