Database Reference
In-Depth Information
Once you successfully download and extract this file, make your way to the extracted
contents directory and invoke the installation of PyMongo by running the install.py
command with Python:
$ cd pymongo-2.5.1
$ sudo python setup.py install
The preceding snippet outputs the entire creation and installation process of the
PyMongo module. Eventually, this process brings you back to your prompt, at which time
you're ready to start using PyMongo.
Installing PyMongo under Windows
Installing PyMongo under Windows is a straightforward process. As when installing
PyMongo under Linux, Easy Install can simplify installing PyMongo under Windows as
well. If you don't have setuptools installed yet (this package includes the easy_install
command), then go to the Python Package Index website ( http://pypi.python.org ) to
locate the setuptools installer.
The version of setuptools you download must match the version of python
installed on your system.
Caution
For example, assume you have Python version 2.7.5 installed on your system. You
will need to download the setuptools package for v2.7.x. The good news is that you don't
need to compile any of this; rather, you can simply download the appropriate package
and double-click the executable to install setuptools on your system! It is that simple.
If you have previously installed an older version of setuptools, then you will
need to uninstall that version using your system's Add/remove programs feature before
installing the newer version.
Caution
Once the installation is complete, you will find the easy_install.exe file in Python's
Scripts subdirectory. At this point, you're ready to install PyMongo on Windows.
Once you've successfully installed setuptools, you can open a command prompt and
cd your way to Python's Scripts directory. By default, this is set to C:\Python xy \Scripts\ ,
where xy represents your version number. Once you navigate to this location, you can use
the same syntax shown previously for installing the Unix variant:
C:\Python27\Scripts> easy_install PyMongo
 
 
Search WWH ::




Custom Search