Has anybody ever snapped gunicorn?

Robert Park robert.park at canonical.com
Sun Oct 2 18:51:49 UTC 2016


I've got gunicorn3 and python3-gunicorn in my stage-packages, and
gunicorn is working correctly when I run it from my app's source tree,
but when I try to snap it I get this:

Traceback (most recent call last):
  File "/snap/weighttracker/x4/usr/bin/gunicorn3", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
line 2927, in <module>
    @_call_aside
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
line 2913, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
line 2940, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
line 635, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
line 943, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
line 829, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'gunicorn==19.4.5'
distribution was not found and is required by the application

I find this utterly bizarre because this traceback starts in
usr/bin/gunicorn3 and then it apparently fails to load itself. I guess
it's a $PYTHONPATH issue? What am I doing wrong?

https://git.launchpad.net/~robru/+git/weightloss/tree/snapcraft.yaml

Thanks.

-- 
robru




More information about the Snapcraft mailing list