I can give you the exact commands I’ve used on my Raspberry Pi Zero 2. For this I use poetry to setup the virtual environment.
sudo apt install pipx
pipx ensurepath
At this point log in again so poetry will find the path.
pipx install poetry
poetry config virtualenvs.in-project true
mkdir PythonProjects
cd PythonProjects
poetry new --src inkydemo
cd inkydemo
poetry install
Now add the packages needed:
poetry add Pillow
poetry add inky[rpi]==1.5.0
Next prepare a simple image of 800x480 pixels.
I didn’t test this code, but it should be possible to load that image something like this:
from inky.inky_uc8159 import Inky
from inky.auto import auto
from itertools import product
from PIL import Image
# Inky display settings
INKY_DISPLAY = auto()
INKY_DISPLAY.set_border(INKY_DISPLAY.BLACK)
DISPLAY_WIDTH = INKY_DISPLAY.WIDTH
DISPLAY_HEIGHT = INKY_DISPLAY.HEIGHT
image_name = 'image_800_480.jpg'
image_open = Image.open(image_name)
INKY_DISPLAY.set_image(tile_image)
INKY_DISPLAY.show()