Ich bin nicht in der Lage, dies zu tun:kann nicht importiert MongoClient
from pymongo import MongoClient
ich:
>>> import pymongo
>>> from pymongo import MongoClient
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name MongoClient
>>>
ich in der Lage bin zu import pymongo
ohne Probleme.
Ich bin mongodb 2.2.3
und Python 2.7
ausgeführt.
Ich habe dies auch versucht:
>>> connection = pymongo.MongoClient()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'MongoClient'
>>>
Was mache ich falsch?
Haben Sie von PyPI oder von Git installiert? – Chris
Nein, ich weiß nicht, was das ist –
Haben Sie es installiert mit 'pip install pymongo',' easy_install pymongo', oder indem Sie es herunterladen und 'setup.py install' ausführen? – Chris