dlopen() failed to load a library: cairo / cairo-2

后端 未结 6 1087
走了就别回头了
走了就别回头了 2020-12-18 18:43

This is my view:

from django.conf import settings
from django.http import HttpResponse
from django.template.loader import render_to_string
import weasyprint
         


        
6条回答
  •  半阙折子戏
    2020-12-18 19:23

    I had the same error with boxes.py on macOS Mojave. My solution was to install cairocffi with pip3 and cairo with brew. The two commands fail on their own, but together they work for boxes.py:

    pip3 install cairocffi
    brew install cairo
    

提交回复
热议问题