# Preparing to Use Toaster

This chapter describes how you need to prepare your system in order to use Toaster.

## Setting Up the Basic System Requirements

You first need to be sure your build system is set up to run the Yocto Project. See the "What You Need and How You Get It" section in the Yocto Project Quick Start for information on how to set up your system for the Yocto Project.

## Establishing Toaster System Dependencies

Toaster requires extra Python dependencies and `daemon` in order to run. A Toaster requirements file named `toaster-requirements.txt` defines the Python dependencies. The requirements file is located in the `bitbake` directory, which is located in the root directory of the Source Directory (e.g. `poky/bitbake/toaster-requirements.txt`). The dependencies appear in a `pip`, install-compatible format.

### Optionally Setting Up a Python Virtual Environment

It is highly recommended that you use a Python virtual environment that allows you to maintain a dedicated Python executable and its own set of installed modules. Doing so separates the executable from the Python and modules provided by the operating system and therefore avoids any version conflicts.

Follow these steps to set up your virtual environment. These steps assume a Ubuntu distribution:

1. Install `virtualenv`: Install the supported `python-virtualenv` package from your distribution rather than using `pip`.

            $ sudo apt-get install python-virtualenv

2. Create and Activate a Virtual Environment:

            $ virtualenv venv
            $ source venv/bin/activate

If you do choose to set up a virtual environment in which to run Toaster, you must initialize that virtual environment each time you want to start Toaster. Use the following to initialize the environment just before you start Toaster:

         $ source venv/bin/activate

### Install Toaster Packages

You need to install the packages that Toaster requires. Use this command:

         $ pip install -r bitbake/toaster-requirements.txt

### Install `daemon`

Toaster depends on `daemon`. Depending on your distribution, how you install `daemon` differs:

- Debian-Based Systems: If you are running a Debian-based distribution, install `daemon` using the following command:

           $ sudo apt-get install daemon​

- Non-Debian-Based Systems: If you are not running a Debian-based distribution (Redhat-based distribution such as Fedora), you need to download ​the file relevant to the architecture and then install `daemon` manually. Following are the commands for 64-bit distributions:

           $ wget http://libslack.org/daemon/download/daemon-0.6.4-1.x86_64.rpm
           $ sudo rpm -i daemon-0.6.4-1.x86_64.rpm

  Here are the commands for a 32-bit distribution:

           $ wget http://libslack.org/daemon/download/daemon-0.6.4-1.i686.rpm
           $ sudo rpm -i ​daemon-0.6.4-1.i686.rpm​