python buildpack - fatal error: sasl/sasl.h: No such file or directory python buildpack - fatal error: sasl/sasl.h: No such file or directory python python

python buildpack - fatal error: sasl/sasl.h: No such file or directory


Maybe you should install some system libraries before you can install sasl refer to https://pypi.python.org/pypi/sasl/0.1.3

This library contains C++ code, and will require some additional system libraries installed.

Debian/Ubuntu

apt-get install python-dev libsasl2-dev gcc

CentOS/RHEL

yum install gcc-c++ python-devel.x86_64 cyrus-sasl-devel.x86_64


The solution for me was to use pure-sasl and install imypla and thrift_sasl from application code rather than my requirements.txt:

try:    import impyla except ImportError:    print("Installing missing impyla")    import pip    pip.main(['install', '--no-deps', 'impyla'])try:    import thrift_saslexcept ImportError:    print("Installing missing thrift_sasl")    import pip    # need a patched version of thrift_sasl.  see https://github.com/cloudera/impyla/issues/238    pip.main(['install', '--no-deps',  'git+https://github.com/snowch/thrift_sasl'])

I added this code to a view in my flask application: https://github.com/snowch/movie-recommender-demo/blob/master/web_app/app/main/views.py


I was having similar error -

In file included from sasl/saslwrapper.cpp:254:0:sasl/saslwrapper.h:22:23: fatal error: sasl/sasl.h: No such file or directory#include <sasl/sasl.h>                       ^compilation terminated.error: command 'gcc' failed with exit status 1

Try this thread it was helpful for me I can't install python-ldap