title: dlopen() failed to load a library: cairo / cairo-2
body: <p>This is my view:</p>
  
  <pre><code>from django.conf import settings
  from django.http import HttpResponse
  from django.template.loader import render_to_string
  import weasyprint
  
  
      @staff_member_required
      def admin_order_pdf(request, order_id):
          order = get_object_or_404(Order, id=order_id)
          html = render_to_string('orders/order/pdf.html', {'order': order})
          response = HttpResponse(content_type='application/pdf')
          response['Content-Disposition'] = 'filename="order_{}.pdf"'.format(order.id)
          weasyprint.HTML(string=html).write_pdf(response,
                                                 stylesheets=[weasyprint.CSS(settings.STATIC_ROOT + 'css/pdf.css')])
          return response
  </code></pre>
  
  <p>when i want to import (import weasyprint) it gives me a error.</p>
  
  <pre><code>ERROR:
  
  Request Method: GET
  Request URL:    http://127.0.0.1:8000/admin/orders/order/
  Django Version: 1.8.6
  Exception Type: OSError
  Exception Value:    
  dlopen() failed to load a library: cairo / cairo-2
  </code></pre>
  
  <p>I already installed weasyprint and cairocffi. I'm using osx El Capitan.</p>