Install Python+mongodb under Windows 7

Source: Internet
Author: User
Tags mongodb

Turn from: http://www.chengxuyuans.com/syskills/Windows7/66110.html


1. Python Installation

Download: http://python.org/download/

Double-click the installation and add the path to the system environment variable path after installation.

2. MongoDB Installation

Download: http://www.mongodb.org/downloads

A. Unzip the downloaded installation file and rename it to MongoDB.

B. Open the command prompt and enter the extracted MongoDB directory,

such as: CD D:\mongodb

C. Configure environment variables to add the bin directory to the System environment variable path.

D. Create a Data folder, MongoDB the default data folders are C:\data\db, and if you do not want to use the path, you can specify DBPath

Create a Data folder

MD Data

MD data\db

Run Mongod.exe

Mongod.exe--dbpath d:\mongodb\data\db

E. Start MongoDB

Reopen a command Prompt window and execute the following command

Mongo.exe

Enter the MongoDB Shell Command window after entering the carriage.

F. Adding MongoDB to Window service

Create a log folder

MD Log

Creating a configuration file

echo Logpath=d:\mongodb\log\mongo.log > D:\mongodb\mongod.cfg

Install Mongodbfuwu

Mongod.exe--dbpath d:\mongodb\data\db--config d:\mongodb\mongod.cfg--install

Start MongoDB Service

net start MongoDB

Stop MongoDB Service

net stop MongoDB

3. Install Pymongo (Python driver for MongoDB)

Download: https://pypi.python.org/pypi/pymongo/

I downloaded is: pymongo-2.5.2.win32-py2.7.exe

Double-click the installation, the system will automatically find the installation path Python, if not, please select a different version of the installation

Manual: Http://api.mongodb.org/python/current/tutorial.html

Reprinted Annotated Address: http://www.chengxuyuans.com/syskills/Windows7/66110.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.