jeybee
jeybee

Reputation: 333

How to install python modules in sandstorm.io/ipython app?

I have a self-hosted sandstorm.io instance with the ipython app installed.

How do I install python modules so that they are accessible from ipython notebooks?

Ipython is packaged in a sandstorm app with pre-installed modules. As apps are in sandboxes, pip install sympy is not enough.

Upvotes: 3

Views: 281

Answers (1)

Kenton Varda
Kenton Varda

Reputation: 45151

Unfortunately, this currently isn't possible, because inside a Sandstorm container the app code is read-only. To make this work, we'd need to do one of the following:

  1. The IPython app could be designed to download and install packages into /var, which is writable but specific to one notebook. This could probably be done with minor app changes only. The down side is that you'd have to re-install modules for each notebook you create, wasting time and storage space. (IPython would also need to explicitly ask permission to talk to the package repository before it could download anything.)
  2. Sandstorm could implement a planned feature we call "add-on packages", which would allow defining an SPK (Sandstorm package) which adds files to some other SPK. Then, Python packages would need to be converted to such SPKs (this part could probably be automated). You could then install modules across all your notebooks at once. Unfortunately we aren't sure how soon we'll be able to add this.

Upvotes: 3

Related Questions