Error setting up environment on Google Cloud Shell to use Cloud ML

620 views Asked by At

Following instructions from https://cloud.google.com/ml/docs/how-tos/getting-set-up:

  1. Created a project and started the Cloud Shell.
  2. Ran below script to Install required tools and dependencies

    curl https://raw.githubusercontent.com/GoogleCloudPlatform/cloudml-samples/master/tools/setup_cloud_shell.sh | bash

Expected outcome >>

"Success! Your environment has the required tools and dependencies." when the script finishes successfully.

Actual outcome >>

+ pip install --user --upgrade 'pillow>=3.4.2' --global-option=build_ext --global-option=--disable-jpeg
/usr/local/lib/python2.7/dist-packages/pip-8.1.1-   py2.7.egg/pip/commands/install.py:180: UserWarning: Disabling all use of wheels    due to the use of --build-options / --g
lobal-options / --install-options.
cmdoptions.check_install_build_global(options)
Collecting pillow>=3.4.2
Using cached Pillow-4.0.0.tar.gz
Collecting olefile (from pillow>=3.4.2)
Using cached olefile-0.43.zip
Installing collected packages: olefile, pillow
Running setup.py install for olefile ... error
Complete output from command /usr/bin/python -u -c "import setuptools,     tokenize;__file__='/tmp/pip-build-  KwQqVS/olefile/setup.py';exec(compile(getattr(tokenize, 'op
en', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" build_ext --disable-jpeg install --record /tmp/pip-eOHYKZ-record/install-record.txt --single-vers
ion-externally-managed --compile --user --prefix=:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: -c --help [cmd1 cmd2 ...]
   or: -c --help-commands
   or: -c cmd --help

error: option --disable-jpeg not recognized

----------------------------------------
Command "/usr/bin/python -u -c "import setuptools,    tokenize;__file__='/tmp/pip-build-   KwQqVS/olefile/setup.py';exec(compile(getattr(tokenize, 'open', open)   (__file__).rea
d().replace('\r\n', '\n'), __file__, 'exec'))" build_ext --disable-jpeg   install --record /tmp/pip-eOHYKZ-record/install-record.txt --single-version-  externally-managed -
-compile --user --prefix=" failed with error code 1 in /tmp/pip-build-  KwQqVS/olefile/
2

There are 2 answers

0
lwz1992 On BEST ANSWER

The fix has been pushed to Github, the new version did

pip install --user --upgrade pillow,

which doesn't have the '--disable-jpeg' option. It seems that the new version of Pillow fixed the issue mentioned in Fail during installation of Pillow (Python module) in Linux and removed the option.

0
oattao On

I had the same problem and I solved it. The error came from Pilow. First you should install Pillow seperately: (with sudo)

sudo pip install --upgrade pillow

Then you run again the command:

curl https://raw.githubusercontent.com/GoogleCloudPlatform/cloudml-samples/master/tools/setup_cloud_shell.sh | bash

Everything will be ok.