Snap opendronemap Python fail on Ubuntu 21

There were a couple unresolved issues around this, so I’m making a new one to re-warm the topic.

$ sudo snap install --edge opendronemap
$ /snap/bin/opendronemap --help
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'python3'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = '/usr/bin/python3'
  sys.base_prefix = '/usr'
  sys.base_exec_prefix = '/usr'
  sys.executable = '/usr/bin/python3'
  sys.prefix = '/usr'
  sys.exec_prefix = '/usr'
  sys.path = [
    '/usr/lib/python38.zip',
    '/usr/lib/python3.8',
    '/usr/lib/python3.8/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007fc38c1a2740 (most recent call first):
<no Python frame>
$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=21.04
DISTRIB_CODENAME=hirsute
DISTRIB_DESCRIPTION="Ubuntu 21.04"

Is snap like docker? Is there a copy of Python3.8 in there? My Ubuntu 21 system has Python3.9.

1 Like

Welcome!

Sorry for the trouble!

Yeah, snap is a similar sort of container as docker that carries all dependencies internally.

Does your snap hello world test run properly?

I ran that and thought it would be a reasonable ‘hello world’ and it gave me the Python error.

1 Like

Could you try this one? It is the Canonical-listed one for testing a new snap installation:

Yes, snap works on Ubuntu 21.

$ sudo snap install hello-world
$ /snap/bin/hello-world
Hello World!
1 Like

Looks like potentially something in the snap core20 image we’re packaging with. We’re looking into it. Sorry for the trouble!

Good morning to everibody, I’m facing the same issue. I’m using Ubuntu 20.04, and installed opendronemap via Ubuntu Software.
Terminal gives me this:

~$ /snap/bin/opendronemap
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = ‘python3’
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = ‘/usr/bin/python3’
sys.base_prefix = ‘/usr’
sys.base_exec_prefix = ‘/usr’
sys.executable = ‘/usr/bin/python3’
sys.prefix = ‘/usr’
sys.exec_prefix = ‘/usr’
sys.path = [
‘/usr/lib/python38.zip’,
‘/usr/lib/python3.8’,
‘/usr/lib/python3.8/lib-dynload’,
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named ‘encodings’

Current thread 0x00007f40033a5740 (most recent call first):

Thank you!

1 Like

Welcome!

Sorry for the trouble, and thanks for reproducing the issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.