seomoz / pyreBloom

Fast Redis Bloom Filters in Python
MIT License
289 stars 67 forks source link

Can't Find hiredis/hiredis.h #7

Closed kevinwuhoo closed 11 years ago

kevinwuhoo commented 11 years ago

I'm having difficulty installing pyreBloom in a virtualenv on Ubuntu 13.04 and Python 2.7.4. I've also tried installing it outside a virtualenv which also fails. hiredis was installed with pip in the same virtualenv, and seems to successfully install (I can import it with the interpreter).

kevin:~/pyreBloom$ sudo python setup.py install
Building from C
running install
running build
running build_ext
building 'pyreBloom' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/pyreBloom
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c pyreBloom/bloom.c -o build/temp.linux-x86_64-2.7/pyreBloom/bloom.o
In file included from pyreBloom/bloom.c:23:0:
pyreBloom/bloom.h:28:29: fatal error: hiredis/hiredis.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
dlecocq commented 11 years ago

I'm sorry to hear that you're having trouble! First off, can you find any hiredis.h in your include path? What's the output of:

find /usr/*/include -name hiredis.h
atkinson commented 11 years ago

Hmmm... same issue here but on OSX 10.8 using Python 2.7.3 from homebrew, and running in a virtualenv.

hiredis is pip installed (pip install hiredis) ... I can import it from the python interpreter), but...

pip install -e git+git@github.com:seomoz/pyreBloom.git#egg=pyreBloom

... fails with: pyreBloom/bloom.h:28:10: fatal error: 'hiredis/hiredis.h' file not found

find /usr/*/include -name hiredis.h

... returns no results.

Any ideas?

atkinson commented 11 years ago

Aha!

If anyone finds this ticket, the answer is that "pip install hiredis" doesn't cut it. You need to install hiredis from homebrew / apt / source.

Instructions here: https://github.com/paulasmuth/recommendify/issues/6#issuecomment-4496616

dlecocq commented 11 years ago

I'll update the README.md on this point. We generally check out the git repo and hiredis is included as a submodule, so you've exercised a code path that we haven't used much. Thanks!

dlecocq commented 11 years ago

Er, I take that back. I thought we included it as a submodule, but apparently not.

dlecocq commented 11 years ago

README updated