How do I deactivate an egg?

流过昼夜 提交于 2020-01-01 07:08:07

问题


I've installed cx_Oracle (repeatedly) and I just can't get it to work on my Intel Mac. How do I deactivate/uninstall it?


回答1:


You simply delete the .egg file

On OS X they are installed into /Library/Python/2.5/site-packages/ - in that folder you should find a file named cx_Oracle.egg or similar. You can simple delete this file and it will be gone.

One way of finding the file is, if you can import the module, simply displaying the repr() of the module:

>>> import urllib
>>> urllib
<module 'urllib' from '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.pyc'>
>>> import BeautifulSoup
>>> BeautifulSoup
<module 'BeautifulSoup' from '/Library/Python/2.5/site-packages/BeautifulSoup-3.0.6-py2.5.egg/BeautifulSoup.py'>

If the import fails, the traceback should show the location of the module also.

One thing to note, if the module installed any command-line tools, you'll have to remove these manually also.. On OS X they are installde in /usr/local/bin/ - you can find any tool which uses cx_Oracle using grep:

cd /usr/local/bin/
grep EASY-INSTALL * | grep cx_Oracle

Or simply..

cd /usr/local/bin/
grep cx_Oracle *


来源:https://stackoverflow.com/questions/922323/how-do-i-deactivate-an-egg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!