2011-03-25 7 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에서 깨끗하게 제거 파이썬 쉬운 방법을 발견하지 않은 불쾌한 기호, 그것은 파이썬 2.6에 대한 BeautifulSoup로 언급,하지만 난 2.7이. 슬픈 :(

어떻게 easy-install.pth을 재설정하나요? Spotlight에서 찾을 수 없습니다.

답변

1

시스템 파이썬 2.6에서 easy_install을 실행하는 것처럼 보입니다. Apple은 easy_install을 운영 체제와 함께 제공합니다. python.org에서 Python 2.7을 방금 설치 한 경우 해당 버전에 distribute을 설치해야합니다. (이 코드는 /usr/local/bin에 쓸 수 있도록 root로해야합니다.) 파이썬 버전 접미어 easy_install 버전도 있습니다. easy_install-2.6, 어떤 이유로 시스템 파이썬에 패키지를 설치하고 싶다면 여전히 그렇게 할 수 있습니다.

또한 제거 기능이있는 pip을 조사하십시오.

+0

ActivePython에는 이미 distribute, pip 및 virtualenv가 포함되어 있습니다. –

+0

python.org Pythons는 기본적으로'easy_install'과 같은 Distutils 스크립트를'/ usr/local/bin'이 아니라'bin' 디렉토리의 프레임 워크에 설치합니다. sudo는 일반적으로 필요하지 않습니다. –

+0

아,'/ usr/local/bin'을 사용하는 Apple Python에 대한 경험이 있습니다. 이 경우 설치 프로그램이하지 않는 한 경로에 프레임 워크'bin' 디렉토리를 추가해야합니다. –