2017-06-02 10 views
-1

ich maschinelles Lernen neu bin, heute folge ich dieses Tutorial: https://codelabs.developers.google.com/codelabs/cpb102-txf-learning/index.htmlGoogle Cloud maschinelles Lernen Tutorial Fehler

Aber in Schritt 5 ich einen Fehler bekam

[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 

Bitte helfen Sie mir durch diese gehen Anleitung. Vielen Dank.

bearbeiten Nachdem ich versucht pip install apache-beam zu installieren Ich habe dies:

[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$

Was soll ich als nächstes tun? Danke

+0

Sie haben das Modul zu installieren: 'pip Apache-beam' installieren – Nuageux

+0

ich diese Fehlermeldung bekam, wenn ich versuche, den' Code zu tun pip Apache-beam' –

Antwort

1

Wenn Sie sich die Zeile genau ansehen: OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/avro-1.8.2.dist-info', werden Sie sehen, dass Sie sudo Berechtigungen benötigen.

Führen Sie die folgenden Schritte aus:

sudo pip install apache-beam 
+1

installieren Ich habe die gleiche Art von Fehler auf Glcoud Shell, und Ihre Antwort hat funktioniert !!! Danke @TheDarkKnight –

+0

@ShahnazKhan du bist willkommen :) – TheDarkKnight

Verwandte Themen