2011-03-25 80 views
0

我有64位Python,然后我使用easy_install安装了BeautifulSoup。在OS X上卸载Python后重置easy_install

出于某种原因,我使用this method卸载了64位Python。然后我从Python.org重新安装了32位版本。但是:

Kit:~ Kit$ easy_install beautifulsoup 
Searching for beautifulsoup 
Best match: BeautifulSoup 3.2.0 
Processing BeautifulSoup-3.2.0-py2.6.egg 
BeautifulSoup 3.2.0 is already the active version in easy-install.pth 

Using /Library/Python/2.6/site-packages/BeautifulSoup-3.2.0-py2.6.egg 
Processing dependencies for beautifulsoup 
Finished processing dependencies for beautifulsoup 

这是一个讨厌的迹象,我还没有真正找到一个简单的方法来在OS X干净卸载的Python此外,它提到BeautifulSoup的Python 2.6,但我有2.7。 Sad :(

如何重置easy-install.pth?我无法在Spotlight上找到它。

回答

1

看起来像是从系统Python 2.6运行easy_install。苹果公司运营的操作系统为easy_install。如果您刚刚从python.org安装了Python 2.7,则需要为该版本安装distribute。 (请注意,您需要以root身份执行此操作,因此它可以写入/usr/local/bin。)还有Python版本 - 后缀为easy_install的版本,例如。 easy_install-2.6,所以如果由于某种原因你想在系统Python中安装一个包,那么你仍然可以这么做。

此外,调查pip它具有卸载功能。

+0

请注意,ActivePython已经包含了distribute,pip和virtualenv。 – 2011-03-25 20:33:07

+0

python.org默认情况下,Pythons在'bin'目录下安装Distutils脚本,而不是'/ usr/local/bin',如'easy_install'。通常不需要'sudo'。 – 2011-03-26 05:19:50

+0

啊,我只有使用'/ usr/local/bin'的Apple Python的经验。在这种情况下,您需要将框架'bin'目录添加到您的路径中(除非安装程序那样做?) – 2011-03-26 13:26:27