安装Google Datalab错误:运行Create命令时没有此类文件或目录

时间:2017-11-15 10:39:36

标签: google-cloud-platform google-cloud-datalab

点击Google页面上的installation guide,表示要运行命令:

$ gcloud components install datalab

这将安装datalab命令,当我下次尝试时:

$ datalab create sigma2017
[Errno 2] No such file or directory

来自控制台的照片:

enter image description here

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$ 

2 个答案:

答案 0 :(得分:2)

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

原始答案:

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

答案 1 :(得分:1)

datalab安装似乎失败了。请检查以下两件事。

$ ls ./google-cloud-sdk/bin/ $ gcloud components list

并显示您安装组件的完整消息。