OSError: no library called "cairo" error even after installing macports

Viewed 1664

I'm getting this error when trying to start the Django server by using the python manage.py runserver command.

OSError: no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so.2': dlopen(libcairo.so.2, 2): image not found
cannot load library 'libcairo.2.dylib': dlopen(libcairo.2.dylib, 2): image not found
cannot load library 'libcairo-2.dll': dlopen(libcairo-2.dll, 2): image not found

I'm using python 3.7, django==2.2.5, and Mac BigSur version 11.0.1.

1 Answers

For Mac M1, I was facing this issue while trying to install weasyprint and it got solved by downgrading the version of weasyprint to 53.3.

Related