ModuleNotFoundError: No module named 'psutil'

Hello,

Inside of a snap I would like to call a python script that needs to import two libraries that need be installed via pip, psutil and frida. Both of these are called with a standard import psutil and import frida within the python script.

However, I am unable to import these libraries once they’ve been installed within the snap and can’t seem to figure out how to get past this error: ModuleNotFoundError: No module named 'psutil'

my snapcraft.yaml looks like this (I need these libraries in launchhelper2.py and injector.py:

  leagueoflegends:
    plugin: dump
    source: ./snap/local/scripts
    override-build: |
      snapcraftctl build
      set -ex
      mkdir -p $SNAPCRAFT_PART_INSTALL/wine-runtime
      mkdir -p $SNAPCRAFT_PART_INSTALL/wine-platform
    organize:
      'lolfix': bin/
      'sommelier': bin/
      'wrapper': bin/
      'wrapperb': bin/
      'launchhelper2.py': bin/
      'injector.py': bin/

  py:
    plugin: python
    override-build: |
      pip install wheel
      pip install frida
    build-packages:
      - build-essential
      - python3-dev
      - python3-pip
    stage-packages:
      - python3
      - python3-psutil

I am sure I am doing something rather silly… I just can’t see it…

Any help would be greatly appreciated!

Best, Parker