Database Reference
In-Depth Information
You must have setuptools installed before you can use the pip application. This will be done automatically
when installing the python-pip package.
Note
To install pip , all you need to do is tell apt-get to download and install it, like so:
$ sudo apt-get install python-pip
When this line executes, pip will detect the currently running version of Python and installs itself on the system.
That's all there is to it. Now you are ready to use the pip command to download, make, and install the MongoDB
module, as in this example:
$ sudo pip install pymongo
Again, that's all there is to it! PyMongo is now installed and ready to use.
You can also install previous versions of the pyMongo module with pip using the pip install pymongo= x.y.z
command. here, x.y.z denotes the version of the module.
Tip
Installing PyMongo Manually
You can also choose to install PyMongo manually. Begin by going to the download section of the site that hosts the
PyMongo plugin ( http://pypi.python.org/pypi/pymongo ) . Next, download the tarball and extract it. A typical
download and extract procedure might look like this in your console:
$ wget http://pypi.python.org/packages/source/p/pymongo/pymongo-2.5.1.tar.gz
$ tar xzf pymongo-2.5.1.tar.gz
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.
Caution
The version of setuptools you download must match the version of python installed on your system.
 
 
Search WWH ::




Custom Search