question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

install scrapy failed on Mac OS X Yosemite

See original GitHub issue

I run pip install scrapy, and it only gives me the error:

screen shot 2015-04-01 at 9 01 34 pm

then I realized there is something wrong with cryptography, then I found this would be helpful: Install Cryptography using your own openssl on os x

Accroding to the link above, I run the following command:

$ brew install openssl
$ env ARCHFLAGS="-arch x86_64" LDFLAGS="-L/usr/local/opt/openssl/lib" CFLAGS="-I/usr/local/opt/openssl/include" pip install cryptography
$ pip install scrapy

Then I successfully installed scrapy. I don’t know whether it’s common for OS X users, if so, I think maybe the installation guide could be more specific for OS X.

System: OS X Yosemite 10.10.2 Python : 2.7.9

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
curitacommented, Jul 10, 2015

I’m thinking this could be a duplicate of #1342, the trace shows an error in six and the only additional dependency in OS X for cryptography is xcode-select. Not having it gives a pretty descriptive message:

    ...
    xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
    error: command 'clang' failed with exit status 1

in any of the libraries that compile things.

@linus-young @MojoJolo could you test if the workaround mentioned in that issue (Here: https://github.com/scrapy/scrapy/issues/1342#issuecomment-120312583, basically running export PYTHONPATH="/Library/Python/2.7/site-packages" in your terminal) helps in solving the problem?

0reactions
Trangle91commented, Dec 11, 2019

Thanks. It’s very helpful!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Install Scrapy On my mac - python - Stack Overflow
The problem is your MacOS linked with its default Python2, which in turn misses appropriate GCC flags to compile Scrapy.
Read more >
How do I install Scrapy on Mac OS X 10.10? - Quora
Install it via pip. Open up your Terminal and type pip install Scrapy. You don't have pip installed? No problem, just install Python...
Read more >
OS X Yosemite installation failed - Apple Community
Click on the Partition button and wait until the process has completed. Quit DU and return to the main menu. Reinstall Lion/Mountain Lion....
Read more >
How to Install Scrapy on MacOS? - GeeksforGeeks
Follow the below steps to install the Scrapy package on macOS using the setup.py file: Step 1: Download the latest source package of...
Read more >
GCC error installing lxml with pip on Mac OSX with Xcode
The lxml package has to be compiled on your system (using llvm-gcc-X.X which is the Mac OS X version of gcc) so in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found