Python 如何在Ubuntu11.10上安装py2cairo?

Python 如何在Ubuntu11.10上安装py2cairo?,python,Python,自述文件说: Dependencies ------------ cairo >= 1.10.0 Python >= 2.6 看来我需要先安装cairo。但是如何安装“cairo” 谢谢你的帮助。我安装了libcairo2。但在执行命令“sudo python waf configure”时仍有一些错误: barry@ubuntu:~/graphite/py2cairo$ sudo python waf configure ./options() Setting top

自述文件说:

Dependencies
------------
cairo   >= 1.10.0
Python  >= 2.6
看来我需要先安装cairo。但是如何安装“cairo”


谢谢你的帮助。我安装了libcairo2。但在执行命令“sudo python waf configure”时仍有一些错误:

barry@ubuntu:~/graphite/py2cairo$ sudo python waf configure
  ./options()
 Setting top to                           : /home/barry/graphite/py2cairo 
 Setting out to                           : /home/barry/graphite/py2cairo/build_directory 
 ./configure()
 Checking for 'gcc' (c compiler)          : ok 
 Checking for program python              : /usr/bin/python 
 Checking for python version              : (2, 7, 3, 'final', 0) 
 Checking for library python2.7           : not found 
 Checking for library python2.7           : not found 
 Checking for library python2.7           : yes 
 Checking for program python2.7-config    : not found 
 Checking for program python-config-2.7   : not found 
 Checking for header Python.h             : yes 
 Checking for program pkg-config          : /usr/bin/pkg-config 
 Checking for 'cairo' >= 1.10.2           : not found 
 The configuration failed
(complete log in /home/barry/graphite/py2cairo/build_directory/config.log)

在Ubuntu中找到数据包的全名,然后安装:

apt-cache search libcairo2
apt-get install libcairo2

谢谢你的帮助。我安装了libcairo2。但是当我执行命令“sudo python waf configure”时仍然有一些错误:你知道为什么会发生这些错误吗?我需要配置一些环境变量吗?很抱歉,错误消息太长,无法在此编辑,我重新编辑了问题,并将错误添加到其中。但到目前为止,我已经解决了错误。我使用“sudo apt get install libcairo2 dev”而不是“apt get install libcairo2”。然后配置工作。但是构建步骤失败了:
c:src/cairomodule.c->build_目录/src/cairomodule.c.1.o../src/cairomodule.c:33:20:致命错误:Python.h:没有这样的文件或目录
您需要安装Python头文件:
apt get install Python dev
,再次感谢您的帮助,再次给您添麻烦。在“apt get install python dev”之后,我构建了successful并安装了successful。但是当我导入cairo时,我得到了一个名为cairo的模块