无法在conda上安装google cloud datalab

时间:2018-03-23 01:57:20

标签: conda gcloud google-cloud-datalab

我有一个带有gcloud sdk的conda容器,我可以初始化并使用ERROR: (gcloud.components.install) The components management action could not be performed because the installation root of the Cloud SDK could not be located. If you previously used the Cloud SDK installer, you could re-install the the SDK and retry again. 登录到gcloud就好了。但是,如果我尝试使用 { error: column "undefined" does not exist at Connection.parseE (C:\fordg\node_modules\pg\lib\connection.js:567:11) at Connection.parseMessage (C:\fordg\node_modules\pg\lib\connection.js:391:17) at Socket.<anonymous> (C:\fordg\node_modules\pg\lib\connection.js:129:22) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at Socket.Readable.push (_stream_readable.js:134:10) at TCP.onread (net.js:547:20) name: 'error', length: 109, severity: 'ERROR', code: '42703', detail: undefined, hint: undefined, position: '55', internalPosition: undefined, internalQuery: undefined, where: undefined, schema: undefined, table: undefined, column: undefined, dataType: undefined, constraint: undefined, file: 'parse_relation.c', line: '3183', routine: 'errorMissingColumn' } 安装datalab,我会得到:

Orders.patch([ Object.assign({id: req.params.id}, req.body) ])
    .then(orders => {
        DB.query("SELECT oauth FROM users WHERE id = "+req.body.driver+" OR id = "+req.body.customer+"").then(res=>{
            res.map((row,i)=>{
                let tmp = {
                    token: row.oauth.token
                }

                res[i] = tmp;
            });

            // console.log(res);
            const arrayToken = res.map(function (obj) {
                return obj.token;
            });

            // console.log(arrayToken);

            const message = { 
            // to: res[0].token,
            registration_ids: arrayToken,
          notification: {
            body: "Hey! you got update order notification."
          }
        };

        fcm.send(message, function(err, response){
          console.log(response);
        })
        }).catch(err => console.log(err));

        jsonData = util.jsonData(null, orders);
        res.json(jsonData);
    })
    .catch(err => {
        jsonData = util.jsonData(400);
        res.status(jsonData.code).json(jsonData);
    })
})

有解决方法吗?

1 个答案:

答案 0 :(得分:3)

The Google Cloud SDK component manager only works if you download the SDK through a versioned package, not through a package manager.

See: https://cloud.google.com/sdk/docs/components#managing_cloud_sdk_components.