Can't include python3-qt5

Hi

I need help to create my first snap-app.

I followed this tutorial: Snap Tutorials | Snapcraft documentation

And used this application: https://www.linux-apps.com/p/1127891/ The folder contains: /bin, /share, /doc

My snapcraft.yaml looks like this:

name: kwipe version: ‘2.1.3’ summary: KWipe description: | Multi-Threaded Secure Erase Wipe Application Written in PyQt5.

grade: stable confinement: devmode # use ‘strict’ once you have the right plugs and slots

parts: kwipe: plugin: python python-version: python3 source: ./KWipe-2.1.3 stage-packages: [libparted-dev, python3-pyqt5, libc6] python-packages: [pyparted]

apps: kwipe: command: bin/KWipe.sh

Everything works fine till i hit the point “Preparing to build kwipe” after running “snapcraft prime”.

snapcraft prime stops with the mesage:

“FileNotFoundError: [Errno 2] No such file or directory: ‘/home/pycoder/KWipe/snap/stage/bin/KWipe.sh’”

Now the question:

Whats wrong with my snapcraft.yaml? Did i understood something wrong or is my “folder structure” just shitty?

Cheers :slight_smile:

While it’s difficult to parse your yaml to detect any irregularities due to lack of indentation (for reference, use the triple backtick ``` to begin and end your code pastes), it looks like you’ve stated that your python build will output a file called bin/KWipe.sh (in the command statement). Snapcraft is telling you that this file is not where you said it would be, and so Snapcraft is stopping here because it would be creating a snap that cannot be executed.

The solution is to investigate the stage directory to see whether your build has placed the file at all (it isn’t in the stage directory at bin/KWipe.sh as we’ve already determined), and then recording where it really is for updating the command statement in your yaml; or figuring out why the build didn’t do what you wanted it to.

Hi, here is a little update!

Ok, i could create a snap now but it doesnt include python3-qt5!

My snapcraft.yaml looks like this now:

`pycoder@VBox:~/kwipe$ cat snap/snapcraft.yaml name: kwipe version: ‘2.1.3’ summary: KWipe description: | Multi-Threaded Secure Erase Wipe Application Written in PyQt5.

grade: devmode confinement: strict # use ‘strict’ once you have the right plugs and slots

parts: kwipe: plugin: dump source: /home/pycoder/kwipe/KWipe-2.1.3 stage-packages: [python3-pyqt5, python3-pyparted, libc6, libc-bin]

apps: kwipe: command: bin/KWipe.sh`

But when i start the app it shows me:

pycoder@VBox:~/kwipe$ snap try --devmode prime kwipe 2.1.3 zusammengebaut aus /home/pycoder/kwipe/prime pycoder@VBox:~/kwipe$ kwipe Traceback (most recent call last): File "/snap/kwipe/current/share/kwipe/KWipe", line 21, in <module> from PyQt5 import QtCore, QtWidgets ImportError: No module named 'PyQt5'

Whats the problem? :frowning:

@PyCoder Did you manage to get this sorted out :blush: ?

Saw this & after searching for python on this forum - ya post came up!