我已按照以下说明在LOCAL上设置google-cloud-ml:MAC / LINUX
但是在使用此命令验证设置时,我收到以下错误
curl https://raw.githubusercontent.com/GoogleCloudPlatform/cloudml-samples/master/tools/check_environment.py | python
追踪(最近一次通话): 文件“”,第70行,in 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/init.py”,第16行,in 来自google.cloud.ml.dataflow._analyzer import AnalyzeModel 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/dataflow/init.py”,第22行,in 来自_ml_transforms导入DeployVersion 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/dataflow/_ml_transforms.py”,第24行, 将_ml_functions导入为ml_func 文件“/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行,in 来自google.cloud.ml.dataflow.io import tfrecordio 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/dataflow/io/init.py”,第15行,在 import tfrecordio 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/dataflow/io/tfrecordio.py”,第16行,in _crc32c_fn = snappy._crc32c #pylint:disable = protected-access AttributeError:'module'对象没有属性'_crc32c'
看起来谷歌云的数据流库存在一些问题。
我尝试使用以下命令升级数据流库
pip install --upgrade google-api-python-client
但现在,另一个错误。以下是堆栈跟踪:
追踪(最近一次通话): 文件“”,第70行,in 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/init.py”,第16行,in 来自google.cloud.ml.dataflow._analyzer import AnalyzeModel 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/dataflow/init.py”,第17行,in 来自_analyzer import AnalyzeModel 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/google/cloud/ml/dataflow/_analyzer.py”,第19行,in 将apache_beam导入为beam 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apache_beam/init.py”,第78行,in 来自apache_beam import io 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apache_beam/io/init.py”,第21行,in 来自apache_beam.io.avroio import * 文件“/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行,in 来自apache_beam.io import concat_source 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apache_beam/io/concat_source.py”,第24行,在 来自apache_beam.io import iobase 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apache_beam/io/iobase.py”,第853行,in 来自apache_beam.runners.dataflow.native_io.iobase import * 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apache_beam/runners/init.py”,第23行,in 来自apache_beam.runners.dataflow_runner导入DataflowRunner 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apache_beam/runners/dataflow_runner.py”,第32行,in 来自apache_beam.internal import json_value 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apache_beam/internal/json_value.py”,第20行,in 来自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 import * 文件“/Users/pratyusha/miniconda2/envs/cloudml/lib/python2.7/site-packages/apitools/base/py/credentials_lib.py”,第50行,in 来自oauth2client import locked_file
答案 0 :(得分:0)
这看起来像是'snappy'的不同版本。你能检查一下你安装了哪个版本的python-snappy吗?
您可以通过运行:
来执行此操作pip freeze | grep python-snappy
它适用于我的版本0.5,这是最新版本。如果您有早期版本,请尝试运行:
pip install --upgrade python-snappy
(必要时使用'sudo'或'--user'。)