python - 无法在 centos 6 上安装 cairosvg

标签 python svg centos cairo

在 Centos 上执行 sudo pip install cairosvg 时 出现以下错误

  self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 949, in run_setup
  raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-WJIHyJ/cairocffi/

最佳答案

CentOS 6.8 - 64

# yum install libffi-devel.x86_64

# pip install cairosvg
.
.
Installing collected packages: pycparser, cffi, cairocffi, cairosvg
  Running setup.py install for pycparser
  Running setup.py install for cffi
  Running setup.py install for cairocffi
  Running setup.py install for cairosvg
Successfully installed cairocffi-0.7.2 cairosvg-1.0.22 cffi-1.7.0 pycparser-2.14

关于python - 无法在 centos 6 上安装 cairosvg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38537532/

相关文章:

python - Pandas 替换具有多种变体的列中的字符串值

python - 使用Python request.get param 但它给了我错误的url

html - SVG:通过悬停另一个矩形来为矩形着色(填充)

javascript - FabricJS SVG 到 Canvas (使用 FileReader)

linux - 关于 CentOS 或任何 Linux 机器中的可执行路径

python - Scrapy - 从 URL 获取文件大小和类型而不下载文件?

html - SVG 元素上的 CSS 过渡和转换

centos7上请求的Python模块错误

php - 如何在 CentOS 6.2 上安装 PHP mbstring

python - 使用全局字典似乎很糟糕,但到底为什么呢?