Skip to content

WeasyPrint fails with error on OSX 10.7.5/homebrew #79

Closed

Description

I've got the following versions of the requirements installed:

$ brew install python cairo pango gdk-pixbuf libxml2 libxslt libffi
Warning: python-2.7.4 already installed
Warning: cairo-1.12.14 already installed
Warning: pango-1.34.0 already installed
Warning: gdk-pixbuf-2.28.1 already installed
Warning: libxml2-2.9.0 already installed
Warning: libxslt-1.1.28 already installed
Warning: libffi-3.0.13 already installed

And when I install using mktmpenv --system-site-packages -i WeasyPrint, I get this output.

When I run WeasyPrint, I get the following:

Traceback (most recent call last):
  File "/Users/brian.hicks/.virtualenvs/ad1794530a0bf80f/bin/weasyprint", line 9, in <module>
    load_entry_point('WeasyPrint==0.19', 'console_scripts', 'weasyprint')()
  File "/Users/brian.hicks/.venvburrito/lib/python/distribute-0.6.35-py2.7.egg/pkg_resources.py", line 343, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/brian.hicks/.venvburrito/lib/python/distribute-0.6.35-py2.7.egg/pkg_resources.py", line 2309, in load_entry_point
    return ep.load()
  File "/Users/brian.hicks/.venvburrito/lib/python/distribute-0.6.35-py2.7.egg/pkg_resources.py", line 2015, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/Users/brian.hicks/.virtualenvs/ad1794530a0bf80f/lib/python2.7/site-packages/weasyprint/__init__.py", line 304, in <module>
    from .css import PARSER, preprocess_stylesheet
  File "/Users/brian.hicks/.virtualenvs/ad1794530a0bf80f/lib/python2.7/site-packages/weasyprint/css/__init__.py", line 30, in <module>
    from . import computed_values
  File "/Users/brian.hicks/.virtualenvs/ad1794530a0bf80f/lib/python2.7/site-packages/weasyprint/css/computed_values.py", line 18, in <module>
    from .. import text
  File "/Users/brian.hicks/.virtualenvs/ad1794530a0bf80f/lib/python2.7/site-packages/weasyprint/text.py", line 18, in <module>
    import cairocffi as cairo
  File "/Users/brian.hicks/.virtualenvs/ad1794530a0bf80f/lib/python2.7/site-packages/cairocffi/__init__.py", line 36, in <module>
    cairo = dlopen(ffi, 'libcairo.so.2', 'libcairo-2.dll', 'cairo', 'libcairo-2')
  File "/Users/brian.hicks/.virtualenvs/ad1794530a0bf80f/lib/python2.7/site-packages/cairocffi/__init__.py", line 31, in dlopen
    return ffi.dlopen(names[0])  # pragma: no cover
  File "/Users/brian.hicks/.virtualenvs/ad1794530a0bf80f/lib/python2.7/site-packages/cffi/api.py", line 111, in dlopen
    lib, function_cache = _make_ffi_library(self, name, flags)
  File "/Users/brian.hicks/.virtualenvs/ad1794530a0bf80f/lib/python2.7/site-packages/cffi/api.py", line 364, in _make_ffi_library
    raise OSError("library not found: %r" % (name,))
OSError: library not found: 'libcairo.so.2'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions