Scrapy Installation Fails with error 'cannot open include: 'openssl/aes.h '

不羁的心 提交于 2019-11-30 17:55:47

I got same error installing different python app. I was missing OpenSSL dev package, solved by:

sudo apt-get install libssl-dev

On OSX

brew install openssl and then possibly brew link openssl --force if you are informed that links were not created.

Install Scrapy using the following command

env CRYPTOGRAPHY_OSX_NO_LINK_FLAGS=1 LDFLAGS="$(brew --prefix openssl)/lib/libssl.a $(brew --prefix openssl)/lib/libcrypto.a" CFLAGS="-I$(brew --prefix openssl)/include" pip install scrapy

You can, if you wish, substitute openssl for libressl.

It is enough to install openssl

brew install openssl

and export

export LDFLAGS=-L/usr/local/opt/openssl/lib
export CPPFLAGS=-I/usr/local/opt/openssl/include

in ~/.bash_profile. Try to avoid linking with --force parameter because it can lead to the conflicts with system libraries.

To All who end up in the errors while installing scrapy should follow http://community.spiceworks.com/how_to/38490-setting-up-scrapy-on-windows-7. This link describes the most accurate and easy way to install scrapy without coming across any errors on windows 7 and 8 .

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!