安装Google Datalab错误:运行Create命令时没有这样的文件或目录 [英] Installing Google Datalab error: No such file or directory when running Create command

查看:606
本文介绍了安装Google Datalab错误:运行Create命令时没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按照Google页面上的



EDIT2

  G:sdks gr $ ./google-cloud-sdk/bin/gcloud验证登入
您的浏览器已打开后访问:

https://accounts.google.com/o/oauth2/auth?redirect_uri=http%3A%2F%2Flocalhost%3A8085%2F&prompt=select_account&response_type=code&客户_id = 32555940559.apps.googleusercontent.com&安培;范围= HTTPS%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email + HTTPS%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud平台+ HTTPS% 3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin + HTTPS%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute + HTTPS%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth&安培; access_type =离线


警告:`gcloud auth login`不再写入应用程序默认凭证。
如果您需要使用ADC,请参阅:
gcloud auth application-default --help

您现在以[g *****。r ** *******@gmail.com。
您目前的项目是[***** - ****** - 579]。您可以通过运行以下命令来更改此设置:
$ gcloud config set project PROJECT_ID
G:sdks gr $ ./google-cloud-sdk/bin/datalab创建sigma2017 --verbosity = debug
Traceback (最近一次调用最后一次):
文件/Users/gr/sdks/./google-cloud-sdk/platform/datalab-cli/datalab.py,行300,运行
email = get_email_address(),
文件/Users/gr/sdks/./google-cloud-sdk/platform/datalab-cli/datalab.py,第200行,在get_email_address
'value(account) ','--filter','status:ACTIVE'])。strip()
文件/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py第566行,在check_output
process = Popen(stdout = PIPE,* popenargs,** kwargs)
文件/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2。 7 / subprocess.py,第710行,在__init__
errread,errwrite)
文件/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py ,第1335行,在_execute_child
中raise child_exception
OSError:[Errno 2]没有这样的文件或目录
[Errno 2]没有这样的文件或目录
G:sdks gr $


解决方案

datalab命令期望gcloud命令在您的路径中可用。尝试将./google-cloud-sdk/bin/添加到您的PATH或从该目录运行。



原始答案:



从屏幕截图看来,get_email_account似乎失败了。您可以运行'gcloud auth login',它会登录并设置您的帐户电子邮件吗?


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=32555940559.apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth&access_type=offline


WARNING: `gcloud auth login` no longer writes application default credentials.
If you need to use ADC, see:
  gcloud auth application-default --help

You are now logged in as [g*****.r*********@gmail.com].
Your current project is [*****-******-579].  You can change this setting by running:
  $ gcloud config set project PROJECT_ID
G:sdks gr$ ./google-cloud-sdk/bin/datalab create sigma2017 --verbosity=debug
Traceback (most recent call last):
  File "/Users/gr/sdks/./google-cloud-sdk/platform/datalab-cli/datalab.py", line 300, in run
    email=get_email_address(),
  File "/Users/gr/sdks/./google-cloud-sdk/platform/datalab-cli/datalab.py", line 200, in get_email_address
    'value(account)', '--filter', 'status:ACTIVE']).strip()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
[Errno 2] No such file or directory
G:sdks gr$ 

解决方案

The datalab command expects that the gcloud command is available in your path. Try adding ./google-cloud-sdk/bin/ to your PATH or running from that directory.

Original Answer:

From your screenshot, it seems that get_email_account is failing. Can you run 'gcloud auth login', which will log you in and set your account email?

这篇关于安装Google Datalab错误:运行Create命令时没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆