Ubuntu – Add a python dependency to to a snap package

application-developmentpipsnap

I am creating a snap app and I need to install a python dependency using

pip3 install <lib>

How can I do it using snapcraft?

Thanks

Best Answer

I found the answer in IRC. You need to use the python3 plugin specifying the dependencies in a list

parts:
  py:
    plugin: python3
    python-packages:
      - <my-dependency>