MongoDB

champak
₹2,000.00 ₹1,500.00
  • 16 students
  • 2 lessons
  • 0 quizzes
  • 10 week duration

MongoDB

How to install Mongo DB on Anaconda?

First of all update conda if you haven’t done so in the past few days.
Download and install

https://www.mongodb.com/dr/fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-4.0.7-signed.msi/download

Then install it.

Open a command prompt, Navigate to the Scripts directory under Anaconda installation and then type

conda update conda

Then conda update anaconda

conda install -c anaconda mongodb

conda install -c anaconda pymongo

 

 

 

 

Now, start Spyder and type the following program and run it. MongoDB is up and running.


from pymongo import MongoClient
client = MongoClient("mongodb://localhost:27017/")
mydb = client["champakdb"]
print(client.list_database_names())

The output:

[‘admin’, ‘champakdb’, ‘config’, ‘local’]

 

2 thoughts on “How to install Mongo DB on Anaconda?

  1. hello sir!
    I follow step for installing mongo DB installation done but when I follow the step of “conda update conda” then an error message generate here Solving environment: failed
    how to solve this problem please help me

    1. First of all update conda is not really needed. Its just that we do it often just to ensure that everything is up to date.

      You need to go to the Scripts directory because that is where conda is installed.

      If this fails then try using Anaconda Prompt.

Leave a Reply

Your email address will not be published. Required fields are marked *