Python snap fails to import module

I’m trying to turn a python project into a snap, in particular Coala.

However, even though pip has already installed appdirs, it still complains about being unable to import appdirs.

As seen here, pip manages to collect appdirs.

Skipping appdirs, due to already being wheel.
Skipping coala-utils, due to already being wheel.
Skipping colorlog, due to already being wheel.
Skipping dependency-management, due to already being wheel.
Skipping Pygments, due to already being wheel.
Skipping PyPrint, due to already being wheel.
Skipping requests, due to already being wheel.
Skipping setuptools, due to already being wheel.
Skipping unidiff, due to already being wheel.
Skipping colorama, due to already being wheel.
Skipping certifi, due to already being wheel.
Skipping chardet, due to already being wheel.
Skipping urllib3, due to already being wheel.
Skipping idna, due to already being wheel.
Building wheels for collected packages: coala, libclang-py3, sarge, termcolor

However, over here it fails to import.

    File "/tmp/pip-blfx9eg0-build/coalib/misc/BuildManPage.py", line 57, in finalize_options
      mod = __import__(mod_name, fromlist=fromlist)
    File "/tmp/pip-blfx9eg0-build/coalib/parsing/DefaultArgParser.py", line 3, in <module>
      from coalib.misc import Constants
    File "/tmp/pip-blfx9eg0-build/coalib/misc/Constants.py", line 3, in <module>
      import appdirs
  ImportError: No module named 'appdirs'

Here is the full log.

I am aware of this which may or may not be related. Any ideas of what went wrong?

Deeply appreciate any help and suggestions.

@daniellimws do you mind sharing your project with us? I’d like to try to build locally so I can poke at it.

@kyrofa Here it is.