Issues generating snap

Mark Shuttleworth mark at
Wed Jan 4 10:23:30 UTC 2017

On 04/01/17 08:34, Gareth France wrote:
> /usr/bin/env: 'python': No such file or directory
> It is a python script I've packaged. Any ideas?

Try changing the shell invocation line (first line of the Python script)
to /usr/bin/python3 rather than /usr/bin/env

Python3 is included in the core snap, so it is available at that path
for all devmode/strictly confined snaps.

If you need python2 then you are best off using snapcraft which I think
will bundle the interpreter and dependency python libraries in your snap
for you.

The core snap has python3 and a base set of well-maintained stable
python libraries. You can if you want duplicate those in your snap but
it's probably perfectly reasonable to trust the core snap maintainers
(this is essentially all the same rules as Ubuntu's base packages).


More information about the Snapcraft mailing list