svg转png pdf 用cairosvg 安装报错 解决方法
安装方法pip install cairosvg导入后报错OSError: no library called "cairo" was foundno library called "libcairo-2" was foundcannot load library 'libcairo.so': error 0x7ecannot load library 'libcairo.2.dylib': er
·
安装方法
pip install cairosvg
导入后报错
OSError: no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0x7e
这时需要安装GTK+ for Windows Runtime Environment Installer: 64-bit
https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer
下载并安装(一路默认选项即可),结束后可以发现系统变量 PATH 已经自动加入环境变量:C:\Program Files\GTK2-Runtime Win64\bin,如果没有需要自行加入。
之后重启编辑器,我用的是pycharm。
pip安装时报错,Cairocffi引起的egg错误
安装0.8版本
为什么不安装0.6版本,因为安装0.6版本报错,更换0.8版本后,错误消失
OSError: cannot load library 'libcairo.so.2': error 0x7e.
pip install cairocffi==0.8
参考
https://www.it1352.com/1749918.html
https://stackoverflow.com/questions/6589358/convert-svg-to-png-in-python
更多推荐
已为社区贡献8条内容
所有评论(0)