This article contains instructions for running examples on main.
For released versions of iceoryx2, you may use pip to install the released
Python bindings. e.g.
pip install iceoryx2==0.7.0Be sure to switch to the matching release tag to ensure compatability:
git checkout v0.7.0Since iceoryx2 is written in Rust we need to install that first. We recommend the official approach.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shAdditionally, install poetry to simplify managing the Python virtual environment:
curl -sSL https://install.python-poetry.org | python3 -
poetry self add poetry-plugin-shellThen you can set up a virtual environment and install all dependencies using:
poetry --project iceoryx2-ffi/python installCompile the iceoryx2 Python language bindings into the virutal environment by calling:
poetry --project iceoryx2-ffi/python build-into-venvThe language bindings will be then available for use inside the virtual environment.
First enter the virtual environment:
poetry --project iceoryx2-ffi/python shellYou can then run any Python example from within the virtual environment:
python examples/python/publish_subscribe/publisher.py