<commit_before>Installing Fabric and its dependencies
======================================

Fabric itself takes a little effort to setup, but it's worth it.

The Fabric community is quite active, and we will use the latest version.

We will run Fabric from Python's
[virtualenv](http://www.virtualenv.org/en/latest/), which isolates the installation in a
virtual environment that is easy to remove and re-install.

If you do not already have virtualenv installed, do that first:

#### On Ubuntu

    sudo apt-get install python-virtualenv

and use the (outdated) Ubuntu fabric package to install Fabric's dependencies (such as compiler and python header files required for the crypto library):

    apt-cache depends fabric | grep Depends: | sed 's/^ *Depends: //' | xargs sudo apt-get ---yes install
    sudo apt-get --yes install python-dev


### On OSX

You need a system compiler. If you have a developer.apple.com account you can download and
install the command-line tools separately; if not, download Xcode from the App Store, and install the
"Command Line Tools" component in the Downloads pane in Preferences.

If you use [homebrew](http://brew.sh)
(recommended), install a fresh python and virtualenv with:

    brew install python
    pip install virtualenv

If not, just do:

    sudo easy_install virtualenv

### Installing Fabric

Now we can create a virtualenv to install fabric into:

    VIRTUAL_ENV_DIR=$HOME/fabric
    virtualenv "$VIRTUAL_ENV_DIR"
    source "$VIRTUAL_ENV_DIR/bin/activate"

This will change your bash prompt to include a "(fabric)" prefix.
Whenever you want to run fabric, just re-activate your virtualenv with that source command.

And, finally, we're ready to actually install Fabric:

    pip install fabric jinja2

To verify you can run it, invoke it to print out its versions:

    (fabric)mak@crab$ fab -V
    Fabric 1.5.1
    Paramiko 1.9.0

Yay!<commit_msg>recommend homebrew, so you get a recent python with pip<commit_after>Installing Fabric and its dependencies
======================================

Fabric itself takes a little effort to setup, but it's worth it.

The Fabric community is quite active, and we will use the latest version.

We will run Fabric from Python's
[virtualenv](http://www.virtualenv.org/en/latest/), which isolates the installation in a
virtual environment that is easy to remove and re-install.

If you do not already have virtualenv installed, do that first:

#### On Ubuntu

    sudo apt-get install python-virtualenv

and use the (outdated) Ubuntu fabric package to install Fabric's dependencies (such as compiler and python header files required for the crypto library):

    apt-cache depends fabric | grep Depends: | sed 's/^ *Depends: //' | xargs sudo apt-get ---yes install
    sudo apt-get --yes install python-dev


### On OSX

You need a system compiler. If you have a developer.apple.com account you can download and
install the command-line tools separately; if not, download Xcode from the App Store, and install the
"Command Line Tools" component in the Downloads pane in Preferences.

You need a recent Python, pip, and virtual_env.
I strongly recommend [homebrew](http://brew.sh),
so you can install a fresh python and virtualenv with:

    brew install python
    pip install virtualenv


### Installing Fabric

Now we can create a virtualenv to install fabric into:

    VIRTUAL_ENV_DIR=$HOME/fabric
    virtualenv "$VIRTUAL_ENV_DIR"
    source "$VIRTUAL_ENV_DIR/bin/activate"

This will change your bash prompt to include a "(fabric)" prefix.
Whenever you want to run fabric, just re-activate your virtualenv with that source command.

And, finally, we're ready to actually install Fabric:

    pip install fabric jinja2

To verify you can run it, invoke it to print out its versions:

    (fabric)mak@crab$ fab -V
    Fabric 1.5.1
    Paramiko 1.9.0

Yay!
{'fraction_non_alphanumeric': 0.0845435684647303, 'fraction_numerical': 0.0036307053941908715, 'mean_word_length': 4.0156046814044215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3170760', 'n_tokens_mistral': 1111, 'n_tokens_neox': 1029, 'n_words': 517}