Error installing Pillow (and PIL)

If I use the sudo pip install Pillow command, it works fine until the cleanup step: (this is the full error message from the log file)

 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... Removing temporary dir /private/tmp/pip_build_root... 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-VaD2jT-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/Pillow Exception information: 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,`enter code here` 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-VaD2jT-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/Pillow 

I have xcode command line tools installed. Really stuck on this one.

---- UPDATE ---- Ran brew doctor and deleted all errors. All preconditions of a pillow are established.

Here is the fill pip.log file: http://pastebin.com/08XD9JjM

+2
source share
3 answers

I have the same problem. This seems to be a problem caused by clang with Xcode 5.1. Take a look at the answer to this question:

OS X Pillow Installation Error

My problem is solved with the command in this answer:

 sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install Pillow 

He gives a lot of warnings. But everything is in order.

+5
source

EDIT: This appears to be a known issue for Mac OS X related to Xcode 5.1 or Mavericks 10.9: https://github.com/python-imaging/Pillow/issues/527

This is apparently the most non-invasive way to solve the problem:

I had the same problem and I found that setting "CFLAGS = -Qunused-arguments" and "CPPFLAGS = -Qunused-arguments" resolved my problem (I did not want a clean installation to resolve it). This fix is ​​described here: Ansible Installation -clang: error: unknown argument: '-mno-fused-madd'


Original answer:

It looks like you are trying to install Pillow on Mac OS X. Have you installed all the prerequisites for the Pillow Mac OS X Installation Instructions ?

pip should write more results about the compilation error, if not in the console, and then to the log file. You should look at the log file and post the appropriate compilation error messages in your question to help identify the problem.

0
source

Found a solution:

brew install python

After starting the brew doctor he showed that the barrels were disconnected due to the new installation. To fix this, I had to run brew link --overwrite python .

I could run sudo pip install Pillow without any problems.

0
source

Source: https://habr.com/ru/post/976553/


All Articles