오류 :MongoKit "ImportError를 : OBJECTID라는 이름의 모듈은"나는 아주 이상한 오류 사용 MongoKit를 얻을 수
>>> from mongokit import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/mongokit/__init__.py", line 35, in <module>
from document import Document, ObjectId
File "/usr/local/lib/python2.7/dist-packages/mongokit/document.py", line 48, in <module>
from pymongo.objectid import ObjectId
ImportError: No module named objectid
나는 이유를 찾기 위해 모든 노력을하지만 아무것도 할 수 없습니다. 사실 나는 "ImportError : objectid라는 모듈이 없습니다."라는 오류를 검색하여 전혀 결과가 없습니다. 간단한 튜토리얼 http://namlook.github.com/mongokit/introduction.html#a-quick-example에 따라 MongoKit을 사용하려고 시도했으며 튜토리얼의 첫 번째 줄에서이 이상한 오류가 발생합니다. 아래는 MongoKit 설치 로그입니다.
내가 뭘 잘못하고있어?
[email protected]:~$ sudo pip install mongokit
Downloading/unpacking mongokit
Downloading mongokit-0.7.2.tar.gz (69Kb): 69Kb downloaded
Running setup.py egg_info for package mongokit
Downloading/unpacking pymongo>=2.0.1 (from mongokit)
Downloading pymongo-2.2.tar.gz (228Kb): 228Kb downloaded
Running setup.py egg_info for package pymongo
Downloading/unpacking anyjson>=0.2.2 (from mongokit)
Downloading anyjson-0.3.1.tar.gz
Running setup.py egg_info for package anyjson
Installing collected packages: mongokit, pymongo, anyjson
Running setup.py install for mongokit
Running setup.py install for pymongo
building 'bson._cbson' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ibson -I/usr/include/python2.7 -c bson/_cbsonmodule.c -o build/temp.linux-i686-2.7/bson/_cbsonmodule.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ibson -I/usr/include/python2.7 -c bson/time64.c -o build/temp.linux-i686-2.7/bson/time64.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ibson -I/usr/include/python2.7 -c bson/buffer.c -o build/temp.linux-i686-2.7/bson/buffer.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ibson -I/usr/include/python2.7 -c bson/encoding_helpers.c -o build/temp.linux-i686-2.7/bson/encoding_helpers.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-i686-2.7/bson/_cbsonmodule.o build/temp.linux-i686-2.7/bson/time64.o build/temp.linux-i686-2.7/bson/buffer.o build/temp.linux-i686-2.7/bson/encoding_helpers.o -o build/lib.linux-i686-2.7/bson/_cbson.so
building 'pymongo._cmessage' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ibson -I/usr/include/python2.7 -c pymongo/_cmessagemodule.c -o build/temp.linux-i686-2.7/pymongo/_cmessagemodule.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ibson -I/usr/include/python2.7 -c bson/buffer.c -o build/temp.linux-i686-2.7/bson/buffer.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-i686-2.7/pymongo/_cmessagemodule.o build/temp.linux-i686-2.7/bson/buffer.o -o build/lib.linux-i686-2.7/pymongo/_cmessage.so
Running setup.py install for anyjson
Successfully installed mongokit pymongo anyjson
Cleaning up...
를 해결하기 위해 어떤 방법이 있나요 :이 해결 될 때까지
나는 내 사이트를 계속 운영하기 위해 다음과 같은 더러운 해킹을 사용? 아니면 타사 소스 코드를 다시 작성해야합니까? 그것은 매우 기본적인 것입니다. 실제로 튜토리얼의 첫 번째 줄과 작동하지 않습니다. '내가하고있는 모든 것 - 그냥 mongokit import *에서 가져 오기 * " – Zelid보고 된 버그 : https://github.com/namlook/mongokit/pull/88 – Electro
감사합니다. 나는 최근 버전을 pip에서 설치하려고합니다. git – Zelid