Fabric - Installation

1 minute read

In this article from our Fabric series, I’m going to show you how to get set up with Fabric on your development environment. We’ll get down to installing the fab commands and preparing you for writing your first fabfile. But, as ever, there are Yaks to shave.

Installing the installers

Before we can get down to actually installing Fabric, we need to install some Python libraries that will help us get everything that we need. For this article, I’ll be installing on OSX 10.5 Leopard, but the steps should be roughly similar for any *nix like operating system. Best of all, we’ll stay well clear of my arch enemy, the infuriating macports.

First, let’s install pip, a clever packaging tool replacement for easy_install. I’m not overly familiar with easy_install, but James Bennett’s article Why I like pip, has me convinced its the way to go.

To get pip, we’ll use easy_install. Open your terminal of choice and type:

# sudo easy_install pip

Once pip has installed, let’s use it to install Fabric:

# sudo pip install fabric

On my machine this grabbed a dependency, pycrypto, and set about downloading and compiling all the needed libraries.


Like most Python endeavours, it almost feels too easy to get the tools set up and ready to go. In the next article, we’ll set up our first fabfile and shift some code to our target server.