0

我已按照以下说明在本地设置 google-cloud-ml:MAC/LINUX

google-cloud-ml 设置

但是在使用此命令验证设置时出现以下错误

curl https://raw.githubusercontent.com/GoogleCloudPlatform/cloudml-samples/master/tools/check_environment.py | python

Traceback(最近一次调用最后一次):文件“”,第 70 行,在文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/init .py ”中,第 16 行,从 google.cloud.ml.dataflow._analyzer 导入 AnalyzeModel 文件“ /Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/dataflow/init.py”,第 22 行,从 _ml_transforms 导入 DeployVersion 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/dataflow/_ml_transforms.py”,第 24 行,在 import _ml_functions as ml_func File "/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/dataflow/_ml_functions.py",第 25 行,来自 google.cloud .ml.io.coders 导入 TrainingJobResult 文件“ /Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/io/init.py”,第 21 行,从转换导入 LoadFeatures 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/io/transforms.py”,第 23 行,在从 google.cloud.ml.dataflow.io 导入 tfrecordio 文件“ /Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/dataflow/io/init .py ”,第 15 行,在导入 tfrecordio 文件中“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/dataflow/io/tfrecordio.py”,第 16 行,在_crc32c_fn = snappy._crc32c # pylint: disable=protected-access AttributeError: 'module' 对象没有属性 '_crc32c'

看起来谷歌云的数据流库有一些问题。

我尝试使用以下命令升级数据流库

pip install --upgrade google-api-python-client

但现在,另一个错误。以下是堆栈跟踪:

Traceback(最近一次调用最后一次):文件“”,第 70 行,在文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/init .py ”中,第 16 行,从 google.cloud.ml.dataflow._analyzer 导入 AnalyzeModel 文件“ /Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/dataflow/init .py ”,第 17 行,从 _analyzer 导入分析模型文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/dataflow/_analyzer.py”,第 19 行,在将apache_beam导入为梁文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apache_beam/init.py”,第 78 行,从 apache_beam 导入 io 文件“ /Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apache_beam/io/init.py”,第 21 行,从 apache_beam.io.avroio 导入 * 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apache_beam/io/avroio.py”,第 29 行,从 apache_beam.io 导入 filebasedsource 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apache_beam/io/filebasedsource.py”,第 32 行,从 apache_beam.io 导入 concat_source文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apache_beam/io/concat_source.py”,第 24 行,从 apache_beam.io 导入 iobase 文件“/Users/pratyusha/miniconda2 /envs/cloudml/lib/python2.7/site-packages/apache_beam/io/iobase.py",第 853 行,从 apache_beam.runners.dataflow.native_io.iobase 导入 * 文件"/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apache_beam/runners/init .py”,第 23 行,从 apache_beam.runners.dataflow_runner 导入 DataflowRunner 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apache_beam/runners/dataflow_runner.py”,行32,从 apache_beam.internal 导入 json_value 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apache_beam/internal/json_value.py”,第 20 行,从 apitools.base。 py import extra_types 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apitools/base/py/init .py ”,第 23 行,从 apitools.base.py.credentials_lib 导入* 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apitools/base/py/credentials_lib.py”,第 50 行,从 oauth2client 导入locked_file

4

1 回答 1

0

这看起来像预期的不同版本的“snappy”。你能检查一下你安装了哪个版本的 python-snappy 吗?

您可以通过运行:

pip freeze | grep python-snappy

它适用于我的最新版本 0.5。如果您有早期版本,请尝试运行:

pip install --upgrade python-snappy

(根据需要使用“sudo”或“--user”。)

于 2017-02-28T17:51:47.983 回答