ModuleNotFoundError: No module named 'psutil'


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 and

    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
      'lolfix': bin/
      'sommelier': bin/
      'wrapper': bin/
      'wrapperb': bin/
      '': bin/
      '': bin/

    plugin: python
    override-build: |
      pip install wheel
      pip install frida
      - build-essential
      - python3-dev
      - python3-pip
      - 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