banner



How To Install Pymongo On Windows

We would explain the installation of MongoDB in steps. Before you install, I would suggest everyone utilise ide spyder, Anaconda.

Pace 1 -> Install the community Edition
Installation Link

Step two -> Run the installed MongoDB windows installer package that yous just downloaded.

MongoDB get installed hither->

          C:\Program Files\MongoDB\Server\three.4\        

Step 3 -> Permit'southward fix MongoDB environment

  • (a) Create information directory where all data is stored.
    On C: drive create a binder information inside it create a folder db
    or
    Run
    physician C:\information\db
  • (b) To start MongoDB
    Run ->
    "C:\Program Files\MongoDB\Server\3.iv\bin\mongod.exe"            

    Wait till the connection message appears

  • (c) Verify Surround Path or set path if not correctly set
    Open environment variables, yous tin can search this by windows search.

    Open Environment Variable under the Organisation variables department open up Path.
    This would await like this.

    Add the path of bin folder as shown in the paradigm in a higher place.

  • (d) To Connect to MongoDB
    Open up other control prompt and run->

    "C:\Plan Files\MongoDB\Server\3.iv\bin\mongo.exe            

Step 4-> Ready MongoDB
Open Command Prompt(Admin fashion) type->

mongod

NOTE : Till step four MongoDB volition work only when the Command Prompt is open and information technology's listening.
Now we'll see Extension to make information technology meliorate.

Below steps from step 5 to step 8 are optional :
Step 5-> Open control prompt and run-

mkdir c:\data\db mkdir c:\data\log        

Step 6-> Create a configuration file at C:\Program Files\MongoDB\Server\3.four\mongod.cfg (name of file mongod.cfg)

systemLog:     destination: file     path: c:\data\log\mongod.log storage:     dbPath: c:\data\db        

This can exist created and saved in Admin way of Notepad or Notepad++ or any other editor to run notepad admin mode printing Ctrl + Shift + Enter. Admin mode of notepad will permit you create mongod.cfg and save above text file.

Step vii -> Install the MongoDB service by starting mongod.exe with the –install pick and the -config selection to specify the previously created configuration file.
Now run this command on control prompt

"C:\Plan Files\MongoDB\Server\3.4\bin\mongod.exe"  --config "C:\Program Files\MongoDB\Server\iii.4\mongod.cfg" --install

Footstep viii-> To start & stop MongoDB run
To beginning :

net kickoff MongoDB

To stop :

net end MongoDB        



NOTE :
ALL commands are run on Control Prompt Admin mode, to open command prompt Admin Mode either open normal control prompt and press Ctrl+Shift+Enter or Right click on left windows icon offset push button where you tin meet the options.

Step 9
-> Open Anaconda Command Prompt as shown in the epitome.

Step x -> Install package to utilise MongoDB
To install this package with conda run:

conda install -c anaconda pymongo        

Congratulations!! Installation completed.( Pymongo works only when MongoDB is started, use net kickoff MongoDB to kickoff it and then piece of work on spyder)
You lot can written report and empathise MongoDB in python hither.

This article is contributed past SHAURYA UPPAL. If you like GeeksforGeeks and would like to contribute, you can as well write an article using write.geeksforgeeks.org or post your article to review-squad@geeksforgeeks.org. See your article appearing on the GeeksforGeeks primary folio and aid other Geeks.

Please write comments if you detect anything wrong, or you want to share more information about the topic discussed in a higher place.

Source: https://www.geeksforgeeks.org/guide-install-mongodb-python-windows/

Posted by: rockwellfook1949.blogspot.com

0 Response to "How To Install Pymongo On Windows"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel