Win 7 / Python 2.7 32位:OSError:无法加载库pangocairo-1.0:错误0x7e

时间:2016-07-02 15:01:03

标签: python windows python-2.7 dll cairo

我想测试weasyprint,但是pangocairo的安装存在问题。

我成功安装了weasyprint:

pip install weasyprint

我使用this tutorial安装了gtk,从here下载。

我还设置了gtk \ bin的路径。

$weasyprint
Traceback (most recent call last):
  File "c:\root\python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\root\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "c:\root\python27\scripts\weasyprint.exe\__main__.py", line 5, in <module>
  File "c:\root\python27\lib\site-packages\weasyprint\__init__.py", line 336, in <module>
    from .css import PARSER, preprocess_stylesheet  # noqa
  File "c:\root\python27\lib\site-packages\weasyprint\css\__init__.py", line 30, in <module>
    from . import computed_values
  File "c:\root\python27\lib\site-packages\weasyprint\css\computed_values.py", line 18, in <module>
    from .. import text
  File "c:\root\python27\lib\site-packages\weasyprint\text.py", line 208, in <module>
    'libpangocairo-1.0.so', 'libpangocairo-1.0.dylib')
  File "c:\root\python27\lib\site-packages\weasyprint\text.py", line 200, in dlopen
    return ffi.dlopen(names[0])  # pragma: no cover
  File "c:\root\python27\lib\site-packages\cffi\api.py", line 139, in dlopen
    lib, function_cache = _make_ffi_library(self, name, flags)
  File "c:\root\python27\lib\site-packages\cffi\api.py", line 769, in _make_ffi_library
    backendlib = _load_backend_lib(backend, libname, flags)
  File "c:\root\python27\lib\site-packages\cffi\api.py", line 758, in _load_backend_lib
    return backend.load_library(name, flags)
OSError: cannot load library pangocairo-1.0: error 0x7e

0 个答案:

没有答案