Ошибка установки OS X Pillow

Я следовал этим инструкциям: http://pillow.readthedocs.org/en/latest/installation.html#mac-os-x-installation

$ sudo pip install Pillow

возвращенная ошибка:

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-bAG3wP-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/Pillow
Storing debug log for failure in /var/root/Library/Logs/pip.log

in pip.log:

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/Library/Python/2.7/site-packages/pip/req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/pip/req.py", line 706, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/Library/Python/2.7/site-packages/pip/util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-bAG3wP-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/Pillow

Пожалуйста помогите!

ОБНОВИТЬ:

Я установил PIL раньше. После установки я попробовал черную магию, чтобы заставить PIL работать с libjpeg. А потом я попытался переустановить PIL. Его удалили, но установить не удалось.


person Antonio    schedule 28.03.2014    source источник
comment
Похоже, вы не можете его скомпилировать. У вас OS X 10.9? Есть несколько тем по одной и той же проблеме. Попробуйте установить/обновить xcode с помощью xcode-select --install.   -  person pekapa    schedule 28.03.2014
comment
да, 10.9. Должен ли я переустановить xcode? Это актуально сейчас.   -  person Antonio    schedule 29.03.2014
comment
я попробовал xcode-select --install и нажал Update. Выдала ошибку: Unable to install, because update is unavailable through update server (вольный перевод с русского)   -  person Antonio    schedule 29.03.2014
comment
Я действительно не знаю, это просто случилось с некоторыми людьми после обновления до 10.9, и обновление xcode решило это для меня, но, по-видимому, ответ ниже решил вашу проблему! Хорошо!   -  person pekapa    schedule 02.04.2014


Ответы (1)


Кажется, что-то сломалось при запуске XCode 5.1. Была такая же проблема при установке pycrypto.

Попробуй это:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install Pillow
person domino    schedule 29.03.2014