Installing trilobot package on bookworm 64 bit

I am in a little bit of a bind; I am trying to install both the trilobot library and opencv in a virtual environment, on the RPi bookworm lite OS. Problem is I can install opencv but not trilobot on the 64 bit OS, and vice versa on the 32 bit OS. I need both!.

Installing trilobot on 64 bits, building the wheel for evdev fails. Here are the errors:

error: subprocess-exited-with-error

  × Building wheel for evdev (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-311
      creating build/lib.linux-aarch64-cpython-311/evdev
      copying evdev/util.py -> build/lib.linux-aarch64-cpython-311/evdev
      copying evdev/genecodes.py -> build/lib.linux-aarch64-cpython-311/evdev
      copying evdev/events.py -> build/lib.linux-aarch64-cpython-311/evdev
      copying evdev/__init__.py -> build/lib.linux-aarch64-cpython-311/evdev
      copying evdev/ff.py -> build/lib.linux-aarch64-cpython-311/evdev
      copying evdev/ecodes.py -> build/lib.linux-aarch64-cpython-311/evdev
      copying evdev/uinput.py -> build/lib.linux-aarch64-cpython-311/evdev
      copying evdev/eventio.py -> build/lib.linux-aarch64-cpython-311/evdev
      copying evdev/eventio_async.py -> build/lib.linux-aarch64-cpython-311/evdev
      copying evdev/device.py -> build/lib.linux-aarch64-cpython-311/evdev
      copying evdev/evtest.py -> build/lib.linux-aarch64-cpython-311/evdev
      running build_ext
      running build_ecodes
      writing /tmp/pip-install-x_2lsohj/evdev_73540c98cca44000b4819583ff9b85af/evdev/ecodes.c (using /usr/include/linux/input.h /usr/include/linux/input-event-codes.h /usr/include/linux/uinput.h)
      building 'evdev._input' extension
      creating build/temp.linux-aarch64-cpython-311
      creating build/temp.linux-aarch64-cpython-311/evdev
      aarch64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/karen/trilobot/include -I/usr/include/python3.11 -c evdev/input.c -o build/temp.linux-aarch64-cpython-311/evdev/input.o -std=c99 -Wno-error=declaration-after-statement
      evdev/input.c:10:10: fatal error: Python.h: No such file or directory
         10 | #include <Python.h>
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for evdev
Failed to build evdev
ERROR: Could not build wheels for evdev, which is required to install pyproject.toml-based projects

Perhaps someone has some wisdom to offer?

Alternatively, if someone has advice on installing opencv on in a 32 bit virtual environment: I will be happy either way.