python-pillow / Sane

Python interface to the SANE scanner and frame grabber
Other
54 stars 19 forks source link

fatal error: 'sane/sane.h' file not found #10

Closed hugovk closed 9 years ago

hugovk commented 9 years ago

OS X:

$ python setup.py build
running build
running build_py
running build_ext
building '_sane' extension
clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _sane.c -o build/temp.macosx-10.9-x86_64-2.7/_sane.o
_sane.c:29:10: fatal error: 'sane/sane.h' file not found
#include <sane/sane.h>
         ^
1 error generated.
error: command 'clang' failed with exit status 1
$
$ python setup.py install
running install
running build
running build_py
running build_ext
building '_sane' extension
clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _sane.c -o build/temp.macosx-10.9-x86_64-2.7/_sane.o
_sane.c:29:10: fatal error: 'sane/sane.h' file not found
#include <sane/sane.h>
         ^
1 error generated.
error: command 'clang' failed with exit status 1
$ 

Similar error on Linux. Where's sane.h?

manisandro commented 9 years ago

sane.h is part of the sane development files, on Fedora, that would be in the package sane-backends-devel, on Debian based distros it is in libsane-dev. Don't know how to best install it on OS X. It is definitely not part of python-sane though.

hugovk commented 9 years ago

Thanks, I got it working on Ubuntu with libsane-dev.

It may be worth mentioning these dependencies on the README.

hamburgercheeseburger commented 3 years ago

i have the same problem but on windows

Haroonhsa007 commented 7 months ago

This

i have the same problem but on windows

but how to resolve the issue??