问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/37337381/how-do-i-use-gcp-package-from-outside-of-google-datalabs