Starter Kit – Raspberry Pi 5 (GenX320) - Python dependencies

Starter Kit – Raspberry Pi 5 (GenX320) - Python dependencies

Installation of Python dependencies

OpenEB and Metavision SDK provide Python API and code samples. For using them, you will need to install Python and some additional libraries.
We recommend using Python with virtualenv as described in OpenEB README to avoid conflicts with other installed Python packages:
  1. First, install virtualenv along with development tools:
    1. sudo apt -y install python3.11-venv python3.11-dev
  2. Next, create a virtual environment:

    1. python3 -m venv ~/prophesee/py3venv --system-site-packages
    2. ~/prophesee/py3venv/bin/python -m pip install pip --upgrade
  3. Install the necessary dependencies

    1. If you installed using our custom image, then you need to download our file with dependencies and install them:

        1. wget -O requirements_openeb.txt https://github.com/prophesee-ai/openeb/blob/main/utils/python/requirements_openeb.txt?raw=true
        2. ~/prophesee/py3venv/bin/python -m pip install -r requirements_openeb.txt
    2. If you installed from the source code, then install the dependencies with this command:

        1. ~/prophesee/py3venv/bin/python -m pip install -r ~/openeb/utils/python/requirements_openeb.txt
  4. Optionally, you can run the activate command to modify your shell's environment variables, setting the virtual environment's Python interpreter and scripts as the default for your current session:

      1. source ~/prophesee/py3venv/bin/activate


Running Python samples

Now, Python samples are ready to be run, for example:
    1. python /usr/local/share/metavision/sdk/core/python_samples/metavision_simple_viewer/metavision_simple_viewer.py
  
    As a Prophesee customer, get access to your personal ticketing tool, application notes, product manuals, SDK Download Center and more resources.