我是新来的机器学习,今天我按照这个教程: https://codelabs.developers.google.com/codelabs/cpb102-txf-learning/index.html谷歌云机器学习教程错误
但在第5步我得到一个错误
[email protected]:~$ cd cloudml-samples/flowers
[email protected]:~/cloudml-samples/flowers$
DICT_FILE=gs://cloud-ml-data/img/flower_photos/dict.txt
[email protected]:~/cloudml-samples/flowers$
PROJECT=$(gcloud config list project --format "value(core.project)")
[email protected]:~/cloudml-samples/flowers$
BUCKET="gs://${PROJECT}-flower"
[email protected]:~/cloudml-samples/flowers$
GCS_PATH="${BUCKET}/${USER}"
[email protected]:~/cloudml-samples/flowers$ gsutil mb
$BUCKET
Creating gs://transfer-learning-169510-flower/...
[email protected]:~/cloudml-samples/flowers$ python
trainer/preprocess.py \
> --input_dict "$DICT_FILE" \
> --input_path "gs://cloud-ml-data/img/flower_photos/eval_set.csv" \
> --output_path "${GCS_PATH}/preproc/eval" \
> --cloud
Traceback (most recent call last):
File "trainer/preprocess.py", line 71, in <module>
import apache_beam as beam
ImportError: No module named apache_beam
请帮我办理这个教程。谢谢。
编辑 后,我试图安装pip install apache-beam
我得到这个:
[email protected]:~/cloudml-samples/flowers$ pip install apache-beam Collecting apache-beam Collecting avro<2.0.0,>=1.8.1 (from apache-beam) Requirement already satisfied: mock<3.0.0,>=1.0.1 in /usr/local/lib/python2.7/dist-packages (from apache-beam) Requirement already satisfied: crcmod<2.0,>=1.7 in /usr/local/lib/python2.7/dist-packages (from apache-beam) Requirement already satisfied: grpcio<2.0,>=1.0 in /usr/local/lib/python2.7/dist-packages (from apache-beam) Collecting protobuf==3.2.0 (from apache-beam) Using cached protobuf-3.2.0-cp27-cp27mu-manylinux1_x86_64.whl Collecting oauth2client<4.0.0,>=2.0.1 (from apache-beam) Collecting httplib2<0.10,>=0.8 (from apache-beam) Requirement already satisfied: pyyaml<4.0.0,>=3.12 in /home/chuanman2707/.local/lib/python2.7/site-packages (from apache-beam) Requirement already satisfied: dill==0.2.6 in /usr/local/lib/python2.7/dist-packages (from apache-beam) Requirement already satisfied: funcsigs>=1; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from mock<3.0.0,>=1.0.1->apache-beam) Requirement already satisfied: six>=1.9 in /usr/local/lib/python2.7/dist-packages (from mock<3.0.0,>=1.0.1->apache-beam) Requirement already satisfied: pbr>=0.11 in /usr/local/lib/python2.7/dist-packages (from mock<3.0.0,>=1.0.1->apache-beam) Requirement already satisfied: enum34>=1.0.4 in /usr/local/lib/python2.7/dist-packages (from grpcio<2.0,>=1.0->apache-beam) Requirement already satisfied: futures>=2.2.0 in /usr/local/lib/python2.7/dist-packages (from grpcio<2.0,>=1.0->apache-beam) Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from protobuf==3.2.0->apache-beam) Requirement already satisfied: rsa>=3.1.4 in /usr/local/lib/python2.7/dist-packages (from oauth2client<4.0.0,>=2.0.1->apache-beam) Requirement already satisfied: pyasn1>=0.1.7 in /usr/local/lib/python2.7/dist-packages (from oauth2client<4.0.0,>=2.0.1->apache-beam) Requirement already satisfied: pyasn1-modules>=0.0.5 in /usr/local/lib/python2.7/dist-packages (from oauth2client<4.0.0,>=2.0.1->apache-beam) Requirement already satisfied: packaging>=16.8 in /usr/local/lib/python2.7/dist-packages (from setuptools->protobuf==3.2.0->apache-beam) Requirement already satisfied: appdirs>=1.4.0 in /usr/local/lib/python2.7/dist-packages (from setuptools->protobuf==3.2.0->apache-beam) Requirement already satisfied: pyparsing in /usr/local/lib/python2.7/dist-packages (from packaging>=16.8->setuptools->protobuf==3.2.0->apache-beam) Installing collected packages: avro, protobuf, httplib2, oauth2client, apache-beam Exception: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run prefix=options.prefix_path, File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 784, in install **kwargs File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 851, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files isolated=self.isolated, File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 345, in move_wheel_files clobber(source, lib_dir, True) File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 316, in clobber ensure_dir(destdir) File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/utils/init.py", line 83, in ensure_dir os.makedirs(path) File "/usr/lib/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/avro-1.8.2.dist-info' [email protected]:~/cloudml-samples/flowers$
我应该怎么做?谢谢
您必须安装该模块:'PIP安装apache-beam' – Nuageux
我得到这个错误,当我试着做了'代码PIP安装apache-beam' –