Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在OS X上卸载Python后重置轻松安装_Python_Macos_Reset_Easy Install - Fatal编程技术网

在OS X上卸载Python后重置轻松安装

在OS X上卸载Python后重置轻松安装,python,macos,reset,easy-install,Python,Macos,Reset,Easy Install,我最初使用64位Python,然后使用easy\u install安装了BeautifulSoup 出于某种原因,我使用卸载了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 Beautiful

我最初使用64位Python,然后使用
easy\u install
安装了BeautifulSoup

出于某种原因,我使用卸载了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的简单方法。此外,它提到Python的BeautifulSoup2.6,但我有2.7。Sad
:(


如何重置
easy install.pth
?我在聚光灯下找不到它。

看起来您正在从系统Python 2.6运行
easy\u install
。Apple随操作系统提供
easy\u install
。如果您刚刚从Python.org安装了Python 2.7,则需要安装该版本。(请注意,您需要以root用户身份执行此操作,以便它可以写入
/usr/local/bin
)还有Python版本后缀
easy\u install
版本,例如
easy\u install-2.6
,因此,如果出于某种原因您希望在系统Python中安装软件包,那么您仍然可以这样做


另外,请调查哪个具有卸载功能。

注意,ActivePython已经包括distribute、pip和virtualenv.python.org python,默认情况下,在框架
bin
目录中安装Distutils脚本,比如
easy\u install
,而不是
/usr/local/bin
sudo
,通常不需要。啊,我已经完成了只对使用
/usr/local/bin
的Apple Python有经验。在这种情况下,您需要将框架
bin
目录添加到您的路径中(除非安装程序这样做?)