Installing Scrapy on Mac OSX 10.9.5

I'm new to python and hit the wall with scrapy installation.

Environment Details:

MacBook pro

OSX 10.9.5

Xcode and command line utilities installed

Python 2.7.9 is installed in / usr / local / bin / python

Python 2.7.5 (distribution as part of OSX) installed in / usr / bin / python

using pip install

Date approach

Initial installation attempt (prior to adding python 2.7.9) was not possible as there was no default in 2.7.5 installation. Trying to add pip failed due to security breaches, so I added 2.7.9 installation.

I was then able to run pip but ran into fatal error issues (reported on other threads) due to missing libxml, which was fixed by adding command line tools.

The installation then proceeded but failed with the following error:

/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_464d07d2xdb61d8fa.c -o build/temp.macosx-10.6-intel-2.7/src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_464d07d2xdb61d8fa.o

src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_464d07d2xdb61d8fa.c:218:10: fatal error: 'CommonCrypto/CommonKeyDerivation.h' file not found

#include <CommonCrypto/CommonKeyDerivation.h>

         ^

1 error generated.

error: command '/usr/bin/clang' failed with exit status 1

      

Since hitting this error, I've tried several approaches:

  • remove screening and manually install cryptography - crypto installation fails with the same error
  • remove the plug and reinstall with the command line option pip == 0.22 to install the previous version - installation fails with the same error
  • install using pip command line option --user to install to local users directory - installation fails with the same error

As far as I can tell from searching, this issue has not been reported on Stackoverflow or Github. How can I overcome this problem in order to install scrapy successfully? Thanks to

+3


source to share


1 answer


I was able to solve this on my own with workarounds that I share as the answer to my own question.



I never got any crypto to install via pip. I got around this by installing an anaconda. Cryptography is installed through the anaconda. I then successfully installed scrapy with pip installation, which recognized crypto was already present.

+1


source







All Articles