# Before you begin

*Estimated read time: 3 minutes*

These guides are written to be self-contained. Most code examples should work out of the box, with very few exceptions.

## Prerequisites

Before starting, make sure you've completed the following setup:

{% stepper %}
{% step %}
**Python virtual environment**

Use a dedicated Python virtual environment with both [PySDK](https://docs.degirum.com/pysdk) and [DeGirum Tools](https://docs.degirum.com/degirum-tools) installed.

[Click here](https://docs.degirum.com/pysdk/installation) for instructions on setting up a Python virtual environment and installing PySDK (`degirum`) and DeGirum Tools (`degirum_tools`).

We recommend avoiding your system-level Python installation to prevent conflicts.
{% endstep %}

{% step %}
**Hailo runtime and drivers**

Make sure the HailoRT runtime and drivers are installed.

[Click here](https://docs.degirum.com/pysdk/runtimes-and-drivers/hailort) for Hailo runtime and driver installation instructions.

To verify the installation, run `hailortcli fw-control identify`.

For Hailo-8, you should see output similar to:

{% code overflow="wrap" %}

```bash
Executing on device: 0000:03:00.0
Identifying board
Control Protocol Version: 2
Firmware Version: 4.20.0 (release,app,extended context switch buffer)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8
Serial Number: HLLWMB0214600138
Part Number: HM218B1C2LA
Product Name: HAILO-8 AI ACCELERATOR M.2 B+M KEY MODULE
```

{% endcode %}

If the output is missing or incomplete, reinstall the HailoRT runtime and drivers.
{% endstep %}

{% step %}
**Supported hardware**

Check that your hardware is recognized by PySDK. Run `degirum sys-info` and look for a `Hailo-8` or `Hailo-8L` device.

Here is an example for Hailo-8:

{% code overflow="wrap" %}

```bash
Devices:
  HAILORT/HAILO8:
  - '@Index': 0
    Board Name: Hailo-8
    Device Architecture: HAILO8
    Firmware Version: 4.20.0
    ID: '0000:03:00.0'
    Part Number: xxxxxxx
    Product Name: HAILO-8 AI ACCELERATOR M.2 B+M KEY MODULE
    Serial Number: "xxxxxxxxxxx"
  (OTHER_RUNTIMES):
  - '@Index': 0
```

{% endcode %}

[Click here](https://docs.degirum.com/pysdk/installation#verification) for full instructions on verifying your Hailo and PySDK installation.
{% endstep %}

{% step %}
**Access to the DeGirum AI Hub**

For access to pre-verified models and cloud-hosted hardware, install an AI Hub Workspace Token into your PySDK setup.

While not required, it simplifies model access and improves the development experience.

You can [learn what a Workspace Token is](https://docs.degirum.com/ai-hub/workspaces/workspace-tokens) and [follow these instructions to install one](https://docs.degirum.com/pysdk/user-guide-pysdk/command-line-interface#manage-ai-hub-tokens).

To verify that your token is active, run `degirum token status`:

{% code overflow="wrap" %}

```bash
token: <token>
$schema: https://hub.degirum.com/schemas/GetTokenInfoOutputBody.json
created_at: '2025-01-01T11:11:11.111111Z'
description: <description>
value: <token>
expiration: '2025-01-02T11:11:11.111111Z'
user: <your_email>
space: <your_workspace>
```

{% endcode %}
{% endstep %}
{% endstepper %}

## Optional: improve your deployment environment

Although not required, the tools below can enhance your experience.

{% stepper %}
{% step %}
**IDE support**

We recommend using an integrated development environment like [Visual Studio Code](https://code.visualstudio.com/) (VS Code), which makes it easier to run and edit PySDK and DeGirum Tools code compared to the default Python REPL or plain text files.
{% endstep %}

{% step %}
**Jupyter Notebook extension**

Many examples in our guides are written in Jupyter Notebook and can run directly in your IDE or Google Colab.

[Click here](https://code.visualstudio.com/docs/datascience/jupyter-notebooks) for details on the Jupyter Notebook extension for VS Code.
{% endstep %}
{% endstepper %}

## Core concepts to know

To get the most out of these guides, it's helpful to be familiar with these PySDK and AI Hub [concepts](https://docs.degirum.com/pysdk/user-guide-pysdk/core-concepts):

* **AI inference engine**: the component that runs AI models to make predictions.
* **AI model**: a trained model that performs tasks like object detection or face recognition.
* **AI Model Zoo**: a collection of ready-to-use models available to the inference engine.

Understanding these concepts will give you the foundation to navigate the examples and tools confidently.
