We are now, simply, Redis
As is the case with other platforms, there are a few ways to download and install Redis
and the Python Redis client library. In this section, we’ll discuss the following:
If you read the Linux section, you’ll know that we made sure that the necessary tools
for building Redis from scratch were available, because it was easy to do so. Though
the installation of Xcode for OS X is a bit more difficult, the fact that the build tools
download is 10 times larger makes following along without a long break much more
difficult. As such, you’ll use a method to install Redis that doesn’t require a compiler.
To install Redis in OS X without using a compiler, you’ll use a Python utility called
Rudix, which installs precompiled binaries for a variety of software. Conveniently, as of
this writing it includes an installer for the most recent version of Redis.
To download and install Rudix and Redis, you should open a Terminal. The Terminal
application can be found in the Utilities group inside of Applications. After
you’ve started the terminal, please follow along with the next listing to install Redis
Now that you’ve installed Redis, it’s time to install the Redis client library for Python.
You don’t need to install Python, because OS X versions 10.6 and 10.7 come with
either Python 2.6 or 2.7 preinstalled and available via python by default. While Redis
is running in one terminal, open up a new tab (command + T), and follow along with
the next listing to install the Python Redis library.
If you read either of the Linux or Windows install instructions, you may have noticed
that we used setuptools’s easy_install method to install the Redis client library, but
here you use pip. This is because Rudix offers a pip package, but doesn’t have a setuptools
package, so it was easier to install pip, and then use pip to install the Redis client
library for Python instead of manually downloading and installing setuptools.
Also, if you read the installation instructions for Linux, you may have noticed that
we installed the hiredis helper library there, but you don’t install it on OS X. This is
because, like before, you can’t guarantee that users will have Xcode installed, so you’ll
use what you have available.
Now that you have the Redis Python library installed, you should skip ahead to section
A.4 and follow along to use Redis from Python for the first time.