2011-01-15 2 views
1

Mac OSX가 있습니다. 컴퓨터와 함께 제공되는 일반 Python과 downlaoded가있는 새 버전이 있습니다.사용자 정의 python에 easy_install을 설치하는 데 문제가 있습니다.

$ which easy_install 
/usr/bin/easy_install 

그래서 setuptools에-0.6c11-py2.6.egg 다음

$ cd Downloads/ 
$ sudo sh setuptools-0.6c11-py2.6.egg 
Password: 

Processing setuptools-0.6c11-py2.6.egg 
Copying setuptools-0.6c11-py2.6.egg to /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages 
Adding setuptools 0.6c11 to easy-install.pth file 
Installing easy_install script to /Library/Frameworks/Python.framework/Versions/2.6/bin 
Installing easy_install-2.6 script to /Library/Frameworks/Python.framework/Versions/2.6/bin 

Installed /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg 
Processing dependencies for setuptools==0.6c11 
Finished processing dependencies for setuptools==0.6c11 

이 보였다 다운로드 :이 가 easy_install을은 표준 버전에 일하는

$ which python 
/Library/Frameworks/Python.framework/Versions/2.6/bin/python 

에 작동하려면

$ which easy_install 
/Library/Frameworks/Python.framework/Versions/2.6/bin/easy_install 

mething는 여전히 작동하지 않습니다 :

$ easy_install pymongoSearching for pymongo 
Reading http://pypi.python.org/simple/pymongo/ 
Reading http://github.com/mongodb/mongo-python-driver 
Best match: pymongo 1.9 
Downloading http://pypi.python.org/packages/source/p/pymongo/pymongo-1.9.tar.gz#md5=12e12163e6cc22993808900fb9629252 
Processing pymongo-1.9.tar.gz 
Running pymongo-1.9/setup.py -q bdist_egg --dist-dir /var/folders/vm/vmoE5XqwH-yKiaMzAQS1vE+++TI/-Tmp-/easy_install-lRHv7W/pymongo-1.9/egg-dist-tmp-xFybXs 
warning: no files found matching '*.h' under directory 'pymongo' 
In file included from /usr/include/architecture/i386/math.h:626, 
       from /usr/include/math.h:28, 
       from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pyport.h:235, 
       from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:58, 
       from bson/_cbsonmodule.c:23: 
/usr/include/AvailabilityMacros.h:108:14: warning: #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid. 
In file included from /usr/include/architecture/i386/math.h:626, 
       from /usr/include/math.h:28, 
       from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pyport.h:235, 
       from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:58, 
       from pymongo/_cmessagemodule.c:23: 
/usr/include/AvailabilityMacros.h:108:14: warning: #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid. 
In file included from /usr/include/architecture/i386/math.h:626, 
       from /usr/include/math.h:28, 
       from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pyport.h:235, 
       from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:58, 
       from bson/_cbsonmodule.c:23: 
/usr/include/AvailabilityMacros.h:108:14: warning: #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid. 
zip_safe flag not set; analyzing archive contents... 
Adding pymongo 1.9 to easy-install.pth file 
error: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/easy-install.pth: Permission denied 

내가 파이썬에 갈 때 나는 내가 잘못을하고있는 중이 야

import pymongo 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
ImportError: No module named pymongo 

무엇을?

감사합니다.

답변

2
error: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/easy-install.pth: Permission denied 

루트 권한으로 easy_install을 실행해야합니다.

늦게 게임에
+0

감사합니다. 그것은 효과가있었습니다. su 쉽게 설치하려고했습니다. 그러나 그것은 효과가 없을 것입니다. 나는 그것을 sudo해야했다. –

+0

np, 나는 다행이라고 다행입니다. – user225312

0

방금 ​​시도 했습니까 : easy_install pymongo ??

IDLE에서 pymongo를 가져올 때 그 결과는 어떻게 되나요?

+0

예,이 모든 작업을 수행하기 전에 이런 짓을. 쉬운 설치는 python으로 pymongo를 설치하지만, 사용하는 python의 버전에서는 설치하지 않습니다. –

+0

설치되지 않았다고 생각합니다. 마지막 행의 오류를보십시오. – user225312

+0

그래서 pymongo를 가져올 때, 그는 나에게 ImportError를 줄 것입니다. –

0

조금씩,하지만 난 OSX 10.6.7에서 다음을 수행 성공을 거두었 :

다음
easy_install pip 

:

pip install pymongo 
관련 문제