How to build snap with python 3.6

This is something that should be straightforward but I haven’t found any documentation in how to do so. I gladly appreciate your help.

I need to build an app that requires python 3.6. The snapcraft builds using python 3.5.

Any idea how I can build the snap with python 3.6 or python 3.7 ?

Here are the steps:

  • sudo apt remove --purge snapcraft
  • sudo snap install snapcraft --classic
  • cd <project>
  • snapcraft init
  • edit snap/snapcraft.yaml (leave the base declaration as is, i.e.; core18)
  • run snapcraft

Hope this helps.

Im using build.snapcraft.io so i’m not sure how your suggestion helps.

You can see my snapcraft.yaml file here.

It says base: core18 but still is using python 3.5 instead of python 3.6.

You can see the log of the last build here.

Any idea?

build.snapcraft.io does not have support for core18 yet

I tried this, But the snap is still packaged with python3.5 and the all the modules go and sit in python3.5/site-packages folder. I am building on the official docker image for snapcraft.

NOTE: This is no longer valid: Core18 base in build.snapcraft.io