Ошибка настройки среды в Google Cloud Shell для использования Cloud ML

Следуя инструкциям на странице https://cloud.google.com/ml/docs/how-tos/getting-set-up:

  1. Создал проект и запустил Cloud Shell.
  2. Запустите приведенный ниже скрипт для установки необходимых инструментов и зависимостей.

    curl https://raw.githubusercontent.com/GoogleCloudPlatform/cloudml-samples/master/tools/setup_cloud_shell.sh | бить

Ожидаемый результат >>

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

Фактический результат >>

+ 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/

person Avinash Peyyety    schedule 04.01.2017    source источник


Ответы (2)


Исправление было отправлено на Github, новая версия сделала

pip install --user --upgrade pillow,

который не имеет опции '--disable-jpeg'. Похоже, что в новой версии Pillow устранена проблема, упомянутая в Fail при установке Pillow (модуль Python) в Linux и удалил эту опцию.

person lwz1992    schedule 11.01.2017

У меня была такая же проблема, и я решил ее. Ошибка исходила от Pilow. Сначала вы должны установить Pillow отдельно: (с помощью sudo)

sudo pip install --upgrade pillow

Затем вы снова запускаете команду:

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

Все будет хорошо.

person oattao    schedule 05.01.2017