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, 2019 in DevOps & Agile by Harika
7,526 views

1 answer to this question.

0 votes

Hey @Harika, try this:

  1. sudo apt-get install python-pip

  2. sudo pip install pymongo

answered Feb 9, 2019 by Monish

Related Questions In DevOps & Agile

0 votes
1 answer

error no configuration has been provided kubectl

Hi@Kapil, Kubectl will mot come with minikube. You ...READ MORE

answered May 27, 2020 in DevOps & Agile by MD
• 95,440 points
1,068 views
+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,450 points
950 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,890 points
457 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
• 7,340 points
3,892 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,070 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP