Error saying "ImportError: No module named 'pymongo'"

0 votes

I'm trying to run pymongo on windows and I keep getting the following error:

import pymongo
ImportError: No module named 'pymongo'

my code:

from pymongo import MongoClient

client=MongoClient()
db=client.test_db
dict={'A':[1,2,3,4,5,6]}
db.test_collection.insert(dict)
to_print=db.test_collection.find()
print(to_print)
Feb 9 in DevOps & Agile by Harika
413 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey @Harika, try this:

  1. sudo apt-get install python-pip

  2. sudo pip install pymongo

answered Feb 9 by Monish

Related Questions In DevOps & Agile

+5 votes
3 answers

Error while trying to install postgis extension with greenplum

Try re downloading the package and installing ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,360 points
53 views
0 votes
1 answer

TFS shows a / error when building app.

Seems like you haven't set the virtual ...READ MORE

answered Apr 29, 2018 in DevOps & Agile by DareDev
• 6,580 points
14 views
0 votes
1 answer

to check file has the same value or not i.e comparing file with stat module.

Try the following script: Do the second time ...READ MORE

answered May 1, 2018 in DevOps & Agile by shubham
• 6,500 points
191 views
0 votes
1 answer

Docker for Windows error: “kubectl context missing”

There is an issue with docker for ...READ MORE

answered Aug 27, 2018 in DevOps & Agile by Tyrion anex
• 8,280 points
18 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
27 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.