Anvith
Anvith

Reputation: 507

Does MongoClient work on pymongo2.3?

I have a very straight forward question. I am trying to connect to MongoDB using pymongo 2.3. I get the following error:

ImportError: cannot import name MongoClient

However import pymongo works fine and pymongo.version yields '2.3'. And python version is 2.7.3.

Upvotes: 0

Views: 46

Answers (1)

francisco sollima
francisco sollima

Reputation: 8338

In the documentation says MongoClient was introduced in a later version (2.4). Your pymongo seems outdated. Try removing it, then installing it with pip:

pip install pymongo

Upvotes: 2

Related Questions