我在Windows 7(64位)下运行Python 3.3(Anaconda发行版)。我试图安装Weasyprint应用程序/库,它具有许多依赖性,包括CFFI,我必须从源代码进行编译,因为在二进制发行版中没有兼容的版本。
当我运行weasyprint时,它会在导入加载过程中阻塞,特别是当它调用CFFI以便为开罗加载GTK +库dll时。我得到的错误如下:
$ weasyprint
Traceback (most recent call last):
File "c:\anaconda\envs\py33\lib\site-packages\cffi-0.8-py3.3-win-amd64.egg\cffi\api.py", line 399, in _make_ffi_library
backendlib = backend.load_library(name, flags)
OSError: cannot load library libcairo-2.dll: error 0x7e
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Anaconda\envs\py33\Scripts\weasyprint-script.py", line 9, in <module>
load_entry_point('WeasyPrint==0.20', 'console_scripts', 'weasyprint')()
File "C:\Anaconda\envs\py33\lib\site-packages\pkg_resources.py", line 343, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\Anaconda\envs\py33\lib\site-packages\pkg_resources.py", line 2355, in load_entry_point
return ep.load()
File "C:\Anaconda\envs\py33\lib\site-packages\pkg_resources.py", line 2061, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__']) …Run Code Online (Sandbox Code Playgroud)