/usr/bin/env: ‘python’: No such file or directory ---- When I run the snap based on python , It prompts such error. How could I do then? Please help me . thank you .
------------------------------------------------------------------------------------snapcraft.yaml file contnet : below ------
luhx@ubuntu:~/Projects/snap/duplicity/snap$ more snapcraft.yaml
name: aliyunduplicity
version: ‘1.0.0’
summary: aliyun oss duplicity supports full/incremental backup.
description: |
This is duplicity with Aliyun interface.
Your snap is using devmode confinement, it will see the core snap (i.e. what you see under /snap/core/current) as its root file system. There is no Python 2 interpreter in the core snap, so you get the above error.
Switch to classic confinement so you can see the host file system. With this option, your snap might still fail if the host system doesn’t have Python 2 installed though.
As you’re working on packaging a backup tool, classic confinement might be the right choice.
Thank you for your help . I want to copy my “aliyunduplicitylib” to the default python lib directory, so what should I do then ? Where can I run the shell command , maybe there are some more clever method ?
See the picture below, my executable file run based on the “aliyunduplicitylib” .
Snapcraft’s python plugin will know how to build it then, and also make sure the Python interpreter is included in your package (if that’s the option you want to take).
Hi, setup.py script is an official way to solve the problem. If I want to copy the lib in the snapcraft.yaml file , what sould I do ? “copy in the snapcraft.yaml file” is much more flexible in many scenario, sometimes I can testing something ASAP .
Thanks again.