summaryrefslogtreecommitdiff
path: root/doc/installation.rst
blob: e5754887c09b2a3e7f27e0bd2d51df0b47e027b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
==================
Installation guide
==================

.. highlight:: sh

This guide describes how to install HappyBase.

.. contents:: On this page
   :local:


Setting up a virtual environment
================================

The recommended way to install HappyBase and Thrift is to use a virtual
environment created by `virtualenv`. Setup and activate a new virtual
environment like this::

   $ virtualenv envname
   $ source envname/bin/activate

If you use the `virtualenvwrapper` scripts, type this instead::

   $ mkvirtualenv envname


Installing the HappyBase package
================================

The next step is to install HappyBase. The easiest way is to use `pip` to fetch
the package from the `Python Package Index <http://pypi.python.org/>`_ (PyPI).
This will also install the Thrift package for Python.

::

   (envname) $ pip install happybase

.. note::

   Generating and installing the HBase Thrift Python modules (using ``thrift
   --gen py`` on the ``.thrift`` file) is not necessary, since HappyBase
   bundles pregenerated versions of those modules.


Testing the installation
========================

Verify that the packages are installed correctly::

   (envname) $ python -c 'import happybase'

If you don't see any errors, the installation was successful. Congratulations!


.. rubric:: Next steps

Now that you successfully installed HappyBase on your machine, continue with
the :doc:`user guide <user>` to learn how to use it.


.. vim: set spell spelllang=en: