# Installing Mosek and Eigen

Both `rdbb` and `dbbpy` rely on [Mosek](https://www.mosek.com/) to perform the optimization task underlying the model in **Pazarbasi, Altan**, **Schneider, Paul Georg**, and **Vilkov, Grigory**. *Dispersion of Beliefs Bounds: Sentimental Recovery*. Swiss Finance Institute Research Paper No. 19-57, Management Science, forthcoming, available at [SSRN](https://ssrn.com/abstract=3478587) or [DOI](http://dx.doi.org/10.2139/ssrn.3478587). [Eigen](https://eigen.tuxfamily.org/index.php?title=Main_Page) is required to perform linar algebra operations. This page aims to guide the user in the process of installing Mosek and Eigen on diffent operative systems.

## Installing Mosek

To use Mosek a commercial license is necessary. More about license can be found at [this link](https://www.mosek.com/) and it is relevant that Mosek provides a [personal academic license](https://www.mosek.com/products/academic-licenses/) and a [trial license](https://www.mosek.com/products/trial/).

Then the user has to [download the Mosek binary](https://www.mosek.com/downloads/) appropriate for their operating system and, based on the operative system should:

{% tabs %}
{% tab title="Windows" %}

* run the installer and follow the prompts
* add the installation directory to the system PATH as:

```
MOSEK_HOME = <MOSEK>\mosek\10.2\tools\platform\<PLATFORM>
```

{% endtab %}

{% tab title="Linux" %}

* extract the downloaded tarball
* add the installation directory to the system PATH (typically to the `.bashrc` file or to the `.bash_profile` file) as:

```
export MOSEK_HOME = <MOSEK>/mosek/10.2/tools/platform/<PLATFORM>
```

{% endtab %}

{% tab title="MacOS" %}

* extract the downloaded package
* add the Mosek binaries to your PATH. For example, add the following to your `.bash_profile` or `.zshrc`:

```
export MOSEK_HOME = <MOSEK>\mosek\10.2\tools\platform\<PLATFORM>
```

{% endtab %}
{% endtabs %}

where

* `<MOSEK>` is the folder in which the **MOSEK** Optimization Suite has been installed
* `<PLATFORM>` is the actual platform among those supported by **MOSEK**, i.e. `win64x86`, `linux64x86` or `osx64x86.`

## Installing Eigen

Visit [Eigen website](https://eigen.tuxfamily.org/index.php?title=Main_Page) and download the latest stable distribution. Then, based on your OS:

{% tabs %}
{% tab title="Windows" %}
Extract the downloaded zip file to a desired location, e.g., `C:\Eigen`
{% endtab %}

{% tab title="Linux/MacOS" %}
Extract the downloaded tarball:

```
tar -xzvf eigen-<VERSION>.tar.gz
```

{% endtab %}
{% endtabs %}
