google-cloud-datalab

How do I customize Google Cloud Datalab with extra Python modules?

无人久伴 提交于 2019-12-12 06:40:12
问题 I'd like to install zipline, the python module for financial backtesting, onto a Google Cloud Datalab instance. What's the best way to do this? (I tried to move the VM to user managed and SSH in, but it wouldn't let SSH in). (Also tried %%bash pip install zipline, which almost worked save for version conflicts, but not sure if this is a good idea) 回答1: Currently the %bash pip install option is the only one supported. We should have better customization capability coming quite soon. 来源: https:

Why am I getting an “Error loading notebook” error when trying to set up Datalab and do image classification on Cloud ML Engine?

≡放荡痞女 提交于 2019-12-12 04:57:46
问题 I am following the tutorial here: https://codelabs.developers.google.com/codelabs/cloud-ml-engine-image-classification/index.html?index=..%2F..%2Findex#0 and it is claiming that it will allow me to do image classification on the google cloud. I follow the instructions but when I get to step 4 where I "Start a datalab notebook". It tells me to open the docs folder in Google Cloud DataLab and then open the file called: Hello World.ipynb. WHen I open this file I get a really weird error that I

Google Datastore API from Datalab

泄露秘密 提交于 2019-12-12 01:45:00
问题 I am working with Google's Datalab service, on a Google managed Computer engine(default), and I would like to call my Google Datastore's API. The documentation points to using the from google.appengine.ext import db library. But when I execute this in a datalab code block I get ImportError: No module named appengine.ext . I realize that this likly means that the App Engine SDK is not installed on the Datalab compute engine, My quetion is how can I then access the My Datastore namespace from

%%chart line graph in Datalab based on Bigquery data not rendering

≡放荡痞女 提交于 2019-12-11 23:16:22
问题 I am running a query against our GAP data in Bigquery and I want to generate a chart from it. %%sql --module mobileGraph02 SELECT STRFTIME_UTC_USEC(UTC_USEC_TO_DAY((visitStartTime+36000)*1000000),'%Y/%m/%d') AS dateDate, EXACT_COUNT_DISTINCT(fullVisitorId) AS sessions FROM TABLE_DATE_RANGE([99949271.ga_sessions_], TIMESTAMP('2016-02-21'), TIMESTAMP('2016-02-25')) GROUP BY dateDate ORDER BY dateDate I attempted to create a graph from this based on one of the examples in the 'Interactive Charts

Install conda package from Google Datalab

断了今生、忘了曾经 提交于 2019-12-11 15:20:53
问题 I'm looking to use the ospc taxcalc package in a Google Datalab notebook. This package must be installed via conda. Datalab doesn't have conda by default, so this method (from https://stackoverflow.com/a/33176085/1840471) fails: %%bash conda install -c ospc taxcalc Installing via pip also doesn't work: %%bash pip install conda conda install -c ospc taxcalc ERROR: The install method you used for conda--probably either pip install conda or easy_install conda --is not compatible with using conda

Charts drawn with %%chart command do not render

做~自己de王妃 提交于 2019-12-11 13:37:59
问题 I have this query (a modified version of the query under the Line Chart section of the Datalab Tutorials notebook.) `%%sql --module timeseries SELECT HOUR(timestamp) AS timestamp, AVG(latency) AS latency, FROM [cloud-datalab-samples:httplogs.logs_20140615] WHERE endpoint = 'Popular' GROUP BY timestamp` followed by this call to %%chart %%chart bars --fields timestamp,latency --data timeseries but this doesn't seem to draw the required bar chart, even though I do not receive any error message.

authentication error in Cloud Datalab: "ImportError: No module named gce”

China☆狼群 提交于 2019-12-11 13:10:55
问题 The following problem has been encountered by me and others in a variety of different GCP projects, and under circumstances where the same code worked a few days earlier. I am walking through all of the steps again right now, just to make sure that I still see the same thing. I started by deleting the running instance of Cloud Datalab in my GCP project, and then I started over: first deploy Datalab, then "start using" Datalab. I then select a pre-existing notebook that I have which starts

Datalab does not populate bigQuery tables

蹲街弑〆低调 提交于 2019-12-11 10:55:11
问题 Hi I have a problem while using ipython notebooks on datalab. I want to write the result of a table into a bigQuery table but it does not work and anyone says to use the insert_data(dataframe) function but it does not populate my table. To simplify the problem I try to read a table and write it to a just created table (with the same schema) but it does not work. Can anyone tell me where I am wrong? import gcp import gcp.bigquery as bq #read the data df = bq.Query('SELECT 1 as a, 2 as b FROM

Installing Google Datalab error: No such file or directory when running Create command

十年热恋 提交于 2019-12-11 07:41:31
问题 Following the installation guide on the Google page, which says to run the command: $ gcloud components install datalab This installs the datalab commands and when I next try: $ datalab create sigma2017 [Errno 2] No such file or directory Picture from console: EDIT2 G:sdks gr$ ./google-cloud-sdk/bin/gcloud auth login Your browser has been opened to visit: https://accounts.google.com/o/oauth2/auth?redirect_uri=http%3A%2F%2Flocalhost%3A8085%2F&prompt=select_account&response_type=code&client_id

Can't install pyproj module in Google Datalab Jupyter notebook

让人想犯罪 __ 提交于 2019-12-11 07:11:39
问题 I'm trying to install pyproj within a Google Datalab Jupyter notebook as a required dependency for the basemap library. I've tried two methods, needless to say neither has worked. Method 1: Cloning from git !git clone https://github.com/jswhit/pyproj.git Outputs: Cloning into 'pyproj'... remote: Counting objects: 2811, done. remote: Total 2811 (delta 0), reused 0 (delta 0), pack-reused 2810 Receiving objects: 100% (2811/2811), 5.65 MiB | 1.55 MiB/s, done. Resolving deltas: 100% (1951/1951),