gpt4 book ai didi

python - Hadoop、gcloud 实用程序、Cygwin 中的 bdutils。无连接,无法识别命令

转载 作者:可可西里 更新时间:2023-11-01 14:45:38 32 4
gpt4 key购买 nike

不确定 Hadoop 论坛在哪里...这似乎是最接近的赌注。

我正在尝试设置集群以运行 Hortonworks 平台,这意味着我需要 bdutil 正常工作。

但是,虽然我可以在引导文件夹中运行 install.py 脚本,但我无法使任何 gcloud 或 bdutil 函数正常工作。我最初认为 64 位 python 安装和 32 位 GC SDK 之间存在不兼容...所以,安装了 32 位 Python 2.7 并通过临时删除具有 64 位安装路径的环境变量来强制 Cygwin 使用此路径.

下面是我的错误日志,以及有关目录内容的信息。将不胜感激。我已经为此奋斗了三天。

--KNOWS WHICH PYTHON TO USE
$ which python/cygdrive/c/Users/MJ/Anaconda/python

--INSIDE FOLDER WITH PYTHON SCRIPTS
MJ@Speed_rAcer ~/google-cloud-sdk/bin/bootstrapping
$ ls
__init__.py bq.py install.py setup.py
bootstrapping.py gcutil.py prerun.py setup.pyc
bootstrapping.pyc gsutil.py print_env_info.py

--RUNS PYTHON SCRIPT (install.py). DIDN'T LET ME PICK Y OR N BUT SAYS IT'S CONFIGURED
MJ@Speed_rAcer ~/google-cloud-sdk/bin/bootstrapping
$ python install.py

Do you want to help improve the Google Cloud SDK (Y/n)?

All components are up to date.

Update %PATH% to include Cloud SDK binaries? (Y/n)?

The Google Cloud SDK is currently in developer preview. To help improve the
quality of this product, we collect anonymized data on how the SDK is used.
You may choose to opt out of this collection now (by choosing 'N' at the below
prompt), or at any time in the future by running the following command:
gcloud config set --scope=user disable_usage_reporting true


This will install all the core command line tools necessary for working with
the Google Cloud Platform.

The following directory has been added to your PATH.
C:\Users\MJ\home\google-cloud-sdk\bin

Create a new command shell for the changes to take effect.


For more information on how to get started, please visit:
https://developers.google.com/cloud/sdk/gettingstarted


--NEW SHELL. SHOWING COMMANDS I SHOULD BE ABLE TO RUN (first is gcloud.cmd)
MJ@Speed_rAcer ~/google-cloud-sdk/bin
$ ls
bootstrapping gcloud - Copy.cmd gcutil.cmd gsutil.cmd
bq.cmd gcloud.cmd git-credential-gcloud.cmd sdk

--TRY ONE TO EXECUTE COMMAND
$ ./gcloud auth login
-bash: ./gcloud: No such file or directory

--TRY TWO TO EXECUTE COMMAND
MJ@Speed_rAcer ~/google-cloud-sdk/bin
$ gcloud auth login
-bash: gcloud: command not found

最佳答案

适用于 Windows 的 Cloud SDK 说明适用于 Windows,其中“命令 shell”表示 cmd.exe。 bash 提示符处的 gcloud auth login 指示 bash 在 PATH 上查找可执行文件 gcloud。您安装了适用于 Windows 的 gcloud,因此安装了 gcloud.cmd。 bash 不会对命令进行基于后缀的搜索,因此在搜索 gcloud 时它不会找到 gcloud.cmd

您可以执行以下操作之一让 bash 识别 gcloud 命令:

  1. 运行此命令安装 CygWin shell 脚本:
    gcloud.cmd 组件更新
  2. 运行:alias gcloud='cmd/c gcloud.cmd'
  3. 在包含 gcloud.cmd 的目录中运行:
    echo cmd/c gcloud.cmd\"\$@\"> gcloud
    chmod +x gcloud
  4. 运行 cmd 以获得 Windows 命令提示符。您将不再参加 bash。

关于python - Hadoop、gcloud 实用程序、Cygwin 中的 bdutils。无连接,无法识别命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28288701/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com