Ubuntu – The recommended way to install pip on Snappy Ubuntu Core

pippythonubuntu-core

I would like to provision Docker running on Ubuntu Core with Ansible. For that I need to get docker-py on the machine. Snappy already comes with Python installed, but pip is not provided.

Running the usual script from https://bootstrap.pypa.io/get-pip.py results in an error:

OSError: [Errno 30] Read-only file system: '/usr/local/lib/python2.7/dist-packages/pip-8.1.0.dist-info'

(which of course is makes sense given the architecture of the OS)

Is there a recommended way to get pip / docker-py (or other Python libraries) installed on Snappy Ubuntu Core?

Best Answer

I think you want your own snap, which uses the Docker snap as a framework. In 16.04 you would use a different mechanism to connect to Docker, but in 15.04 the "framework" mechanism was the right way to get this done.

In your own snap you can of course do whatever you want :)

Related Question