0

I am using sudo easy_install Scrapy to try and install Scrapy on my Mac (running Mac OS 10.9.2).

The installation appears to be nearly complete when I receive the error below. I can't seem to figure it out. Can anyone help?

Installed /Library/Python/2.7/site-packages/cssselect-0.9.1-py2.7.egg
Searching for lxml
Reading http://pypi.python.org/simple/lxml/
Best match: lxml 3.3.3
Downloading https://pypi.python.org/packages/source/l/lxml/lxml-3.3.3.tar.gz#md5=f2675837b4358a5ecab5fd9a783fd0e5
Processing lxml-3.3.3.tar.gz
Running lxml-3.3.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-xwN2PB/lxml-3.3.3/egg-dist-tmp-CkAsXC
Building lxml version 3.3.3.
Building without Cython.
Using build configuration of libxslt 1.1.28
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
  warnings.warn(msg)
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: Setup script exited with error: command 'cc' failed with exit status 1

Edit

Using pip install scrapy, I get the error below. So neither option works.

Installing collected packages: w3lib, queuelib, lxml
  Running setup.py install for w3lib
    error: could not create '/Library/Python/2.7/site-packages/w3lib': Permission denied
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/86/1mln902j0jx7698nxqk69_7r0000gn/T/pip_build_zacharygallinger/w3lib/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/86/1mln902j0jx7698nxqk69_7r0000gn/T/pip-hXKj0S-record/install-record.txt --single-version-externally-managed --compile:
    running install

running build

running build_py

creating build

creating build/lib

creating build/lib/w3lib

copying w3lib/__init__.py -> build/lib/w3lib

copying w3lib/encoding.py -> build/lib/w3lib

copying w3lib/form.py -> build/lib/w3lib

copying w3lib/html.py -> build/lib/w3lib

copying w3lib/http.py -> build/lib/w3lib

copying w3lib/url.py -> build/lib/w3lib

copying w3lib/util.py -> build/lib/w3lib

running install_lib

creating /Library/Python/2.7/site-packages/w3lib

error: could not create '/Library/Python/2.7/site-packages/w3lib': Permission denied

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/86/1mln902j0jx7698nxqk69_7r0000gn/T/pip_build_zacharygallinger/w3lib/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/86/1mln902j0jx7698nxqk69_7r0000gn/T/pip-hXKj0S-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/86/1mln902j0jx7698nxqk69_7r0000gn/T/pip_build_zacharygallinger/w3lib
Storing debug log for failure in /Users/zacharygallinger/Library/Logs/pip.log
zgall1
  • 2,865
  • 5
  • 23
  • 39

1 Answers1

3

For the time being you might be able to get past this by doing the following before building it:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

This should signal the compiler to turn these errors back into warnings. Eventually, as indicated by the error message these will be hard errors. Long term, the package maintainer will have to edit the package to not use -mno-fused-madd.

For reference: https://bitbucket.org/cffi/cffi/issue/46/unused-mno-fused-madd-clang-warnings-on-os

ipmcc
  • 29,581
  • 5
  • 84
  • 147
  • Am I supposed to run those two commands immediately before `sudo easy_install scrapy`? If so, I am still getting the same error – zgall1 Mar 20 '14 at 15:21
  • 2
    Try `sudo bash -c "CFLAGS=-Qunused-arguments CPPFLAGS=-Qunused-arguments easy_install Scrapy"` That said, I just did `sudo easy_install Scrapy` on my machine and it worked fine, so something else might be amiss here. I'm not sure. – ipmcc Mar 20 '14 at 15:56
  • For future visitors, I found another answer that is far more authoritative on the subject of this `-mno-fused-madd` issue, over here: http://stackoverflow.com/a/22315129/438982 – ipmcc May 08 '14 at 12:48