<commit_before>* [Mac OS X Installation](#mac-os-x-installation)
* [Linux Installation](#linux-installation)

Mac OS X Installation
=====================

The recommended installation method on Mac OS X is to use
[MacPorts](http://www.macports.org/). Once you have MacPorts set up on your
system, all you have to do is:

    sudo port install cot

Optionally, download [`ovftool`](https://www.vmware.com/support/developer/ovf/)
from VMware and install it. (VMware requires a site login to download `ovftool`,
which is the only reason I haven't automated this too...)

Linux Installation
==================

The specifics may vary depending on your Linux distribution, of course.

* [Check installed Python version](#check-installed-python-version)
* [Install QEMU](#install-qemu)
* [Install `vmdktool` (if needed)](#install-vmdktool-if-needed)
* [Install `fatdisk` (optional)](#install-fatdisk-optional)
* [Install `mkisofs` (optional)](#install-mkisofs-optional)
* [Install `ovftool` (optional)](#install-ovftool-optional)
* [Install COT](#install-cot)

Check installed Python version
------------------------------

Make sure your Python version is at least 2.7:

    > python --version
    Python 2.7.4

If it's an older release (CentOS in particular defaults to old Python versions)
then you need to install a newer version. Refer to http://www.python.org for
installation instructions.

Install QEMU
------------

* Ubuntu and similar: `sudo apt-get install qemu`
* CentOS and similar: `sudo yum install qemu`

See http://en.wikibooks.org/wiki/QEMU/Installing_QEMU for other Linux variants.

Install `vmdktool` (if needed)
------------------------------

First, check your QEMU version to see if you even need `vmdktool`:

    $ qemu-img --version
    qemu-img version 2.1.0, Copyright (c) 2004-2008 <NAME>

If the reported version is 2.1.0 or newer, you don't need `vmdktool`.
If you have an older QEMU version and do need `vmdktool`:

1. Download the latest source distribution from
   http://people.freebsd.org/~brian/vmdktool:

        wget http://people.freebsd.org/~brian/vmdktool/vmdktool-1.4.tar.gz

2. Compile `vmdktool`:

        tar zxf vmdktool-1.4.tar.gz<commit_msg>Dependency on python setuptools<commit_after>* [Mac OS X Installation](#mac-os-x-installation)
* [Linux Installation](#linux-installation)

Mac OS X Installation
=====================

The recommended installation method on Mac OS X is to use
[MacPorts](http://www.macports.org/). Once you have MacPorts set up on your
system, all you have to do is:

    sudo port install cot

Optionally, download [`ovftool`](https://www.vmware.com/support/developer/ovf/)
from VMware and install it. (VMware requires a site login to download `ovftool`,
which is the only reason I haven't automated this too...)

Linux Installation
==================

The specifics may vary depending on your Linux distribution, of course.

* [Check installed Python version](#check-installed-python-version)
* [Install Python `setuptools`](#install-python-setuptools)
* [Install QEMU](#install-qemu)
* [Install `vmdktool` (if needed)](#install-vmdktool-if-needed)
* [Install `fatdisk` (optional)](#install-fatdisk-optional)
* [Install `mkisofs` (optional)](#install-mkisofs-optional)
* [Install `ovftool` (optional)](#install-ovftool-optional)
* [Install COT](#install-cot)

Check installed Python version
------------------------------

Make sure your Python version is at least 2.7:

    > python --version
    Python 2.7.4

If it's an older release (CentOS in particular defaults to old Python versions)
then you need to install a newer version. Refer to http://www.python.org for
installation instructions.

Install Python `setuptools`
---------------------------
* Ubuntu and similar: `sudo apt-get install python-setuptools`

For other OS, refer to https://pythonhosted.org/setuptools/setuptools.html for
installation instructions.

Install QEMU
------------

* Ubuntu and similar: `sudo apt-get install qemu`
* CentOS and similar: `sudo yum install qemu`

See http://en.wikibooks.org/wiki/QEMU/Installing_QEMU for other Linux variants.

Install `vmdktool` (if needed)
------------------------------

First, check your QEMU version to see if you even need `vmdktool`:

    $ qemu-img --version
    qemu-img version 2.1.0, Copyright (c) 2004-2008 <NAME>

If the reported version is 2.1.0 or newer, you don't need `vmdktool`.
If you have an older QEMU version and do need `vmdktool`:

1. Download the latest source distribution from
   http://people.freebsd.org/~brian/vmdktool:

        wget http://people.freebsd.org/~brian/vmdktool/vmdktool-1.4.tar.gz

2. Compile `vmdktool`:

        tar zxf vmdktool-1.4.tar.gz
{'fraction_non_alphanumeric': 0.1570725444040231, 'fraction_numerical': 0.010699764605178685, 'mean_word_length': 3.623145400593472, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 3, 'lorem ipsum': 0, 'www.': 6, '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': '553894', 'n_tokens_mistral': 1534, 'n_tokens_neox': 1414, 'n_words': 488}