0

I created a google compute instance with jupyter and I'd like to use all the nice things datalabs has. Is there a way to get the packages like gcp and the cellmagic like %%sql and %%storage. I found the packages gcloud and google-api-python-client but I don't know if it's the same thing.

ForeverConfused
  • 1,607
  • 3
  • 26
  • 41

1 Answers1

4

https://github.com/googledatalab/datalab will give you Datalab-compatible functionality within Jupyter.

Note, however, that the gcp.* prefix has changed to datalab. I.e. datalab.bigquery, datalab.storage, etc.

Also note that you will need to install the Google Cloud SDK (which has the gcloud command) in your instance.

Graham Wheeler
  • 2,734
  • 1
  • 19
  • 23
  • Hey Graham. Thank you for creating this, it is a godsend. I had to copy the datalab folder to /usr/lib/python3.4/site-packages/ before running jupyter nbextension install --py datalab.notebook then it worked, however, I get strange error ImportError: No module named '_project'. Error occurs in /usr/lib/python3.4/site-packages/datalab/context/_context.py – ForeverConfused May 20 '16 at 05:08
  • The most obvious explanation for this is that we are not Python 3 compatible yet; only 2.7. – Graham Wheeler May 20 '16 at 13:58
  • 2
    I'm working on Python 3 compatibility; hopefully by next week. – Graham Wheeler May 21 '16 at 00:44
  • Thanks so much for what you've done. Much love for it! – ForeverConfused May 21 '16 at 20:29
  • 2
    There is a branch now with Python 3 support. You can get it with 'git clone -b py3 https://github.com/googledatalab/datalab.git', then follow the installation instructions at https://github.com/googledatalab/datalab. Note that you will need node.js and Typescript installed (once you have the former you can install the latter with 'npm install -g typescript'). – Graham Wheeler May 25 '16 at 00:02
  • Is the Python version needed determined by the Jupyter Python version or the Python version running the base code in the notebook,, I assume the former, eg my Jupyter NB runs from P3 but runs p2 notebooks..so I need the p3 version of this code. – dartdog Jun 15 '16 at 20:41