Quantcast
Channel: Programming and Technology » GNU/Linux
Viewing all articles
Browse latest Browse all 55

“AttributeError: ‘module’ object has no attribute ‘MongoClient’” error with Pymongo in Ubuntu 12.04

$
0
0

I’m currently doing the M101P: MongoDB for Developers online course.

course_image

I had this error while running one of the homeworks with pymongo in Ubuntu 12.04:

AttributeError: 'module' object has no attribute 'MongoClient'

I had previously installed pymongo with apt-get like this:

sudo apt-get install python-pymongo

It looks like the package is outdated or broken so I had to remove the pymongo I had installed before and reinstall it using PiP:

sudo apt-get purge python-pymongo
sudo apt-get install python-pip
sudo pip install pymongo

Ref: http://stackoverflow.com/questions/17624416/cant-import-mongoclient


Viewing all articles
Browse latest Browse all 55

Trending Articles