Weasyprint startup error after updating to El Capitan (OS X 10.11)
See original GitHub issueI recently updated my OS on my mac to El Capitan and since then have been running into issues trying to run WeasyPrint. I have updated macports, uninstalled and reinstalled all of the macport dependencies. I’ve also uninstalled and reinstalled WeasyPrint via pip with no issues, but still it doesn’t run. I also have the export DYLD_FALLBACK_LIBRARY_PATH="/opt/local/lib"
in my ~/.profile which helped solve the import errors and allowed WeasyPrint to run before I had El Capitan installed.
When i type weasyprint --help
into the terminal i get the following output/error:
File "main.py", line 14, in <module>
import nextline_webapp.quotes # pylint: disable=unused-import
File "/Users/joshsacks/NextLine/nextline_webapp/quotes.py", line 8, in <module>
from flask_weasyprint import HTML, render_pdf
File "/Library/Python/2.7/site-packages/flask_weasyprint/__init__.py", line 13, in <module>
import weasyprint
File "/Library/Python/2.7/site-packages/weasyprint/__init__.py", line 336, in <module>
from .css import PARSER, preprocess_stylesheet
File "/Library/Python/2.7/site-packages/weasyprint/css/__init__.py", line 30, in <module>
from . import computed_values
File "/Library/Python/2.7/site-packages/weasyprint/css/computed_values.py", line 18, in <module>
from .. import text
File "/Library/Python/2.7/site-packages/weasyprint/text.py", line 18, in <module>
import cairocffi as cairo
File "/Library/Python/2.7/site-packages/cairocffi/__init__.py", line 46, in <module>
cairo = dlopen(ffi, 'cairo', 'cairo-2')
File "/Library/Python/2.7/site-packages/cairocffi/__init__.py", line 43, in dlopen
raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names))
OSError: dlopen() failed to load a library: cairo / cairo-2
Thanks
Issue Analytics
- State:
- Created 8 years ago
- Comments:24 (11 by maintainers)
Top Results From Across the Web
Trouble running WeasyPrint after installing El Capitan (OSX ...
Ok so I found a solution (without changing any of the original weasyprint or cairocffi files). Apparently OS X 10.11 introduces SIP which...
Read more >Weasyprint startup error after updating to El Capitan (OS X 10.11)
Weasyprint startup error after updating to El Capitan (OS X 10.11)
Read more >El Capitan won't Boot after update - Apple Support Communities
I installed El Capitan and it was booting fine. Then I installed the latest update and after the restart, the Mac loads the...
Read more >Running WeasyPrint after updating Mac to El Capitan
I ran into a similar problem and for me it helped to. set my locale in my .zshrc / .bashrc; be sure to...
Read more >Fix Mac OS X El Capitan will not start up after update
OS X El Capitan is the twelfth major release of OS X for Mac computers. It was released on September 30, 2015. Some...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I also experience the problem on a fresh install of
weasyprint
on Mac 10.11.6. I usemacports
thus all the solutions involvingbrew
are not helpful.I installed
sudo port install cairo
afterpip install weasyprint
. I’m using Python 3.5.2Seems like
conda install pango
helped.Same here. Just installed WeasyPrint on an El Capitan install that has not had WeasyPrint on it before or been upgraded from previous OSX installs. Error I get is:
raise OSError(“dlopen() failed to load a library: %s” % ’ / '.join(names)) OSError: dlopen() failed to load a library: cairo / cairo-2