在Ubuntu 14.04上安装py2cairo问题 [英] Installing py2cairo issues on Ubuntu 14.04

查看:163
本文介绍了在Ubuntu 14.04上安装py2cairo问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在python 2.7.6中安装py2cairo.我从 http://cairographics.org/pycairo/下载了源软件包,并解压缩了文件:

I tried to install py2cairo in my python 2.7.6. I downloaded the source package from http://cairographics.org/pycairo/, and unzipped the file:

tar xvfj py2cairo-1.10.0.tar.bz

根据安装步骤,我更改了当前目录:

According to the installing steps, I changed the current directory:

cd py2cairo-1.10.0/

并进行了配置.通过waf:

and did config. by waf:

./waf configure --prefix=/usr

但是执行停止报告错误:

But the execution stopped reporting the error:

    ./options()
Setting top to                           : /home/ruofan/Boost/py2cairo-1.10.0 
Setting out to                           : /home/ruofan/Boost/py2cairo-1.10.0/build_directory 
  ./configure()
Checking for 'gcc' (c compiler)          : ok 
Checking for program python              : /usr/bin/python 
Checking for python version              : (2, 7, 6, 'final', 0) 
Checking for library python2.7           : yes 
Checking for program python2.7-config    : /usr/bin/python2.7-config 
command ['/usr/bin/python', '/usr/bin/python2.7-config', '--includes'] returned 1

我该如何解决问题?

推荐答案

打开py2cairo文件夹,转到.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Tools, 在文件夹内,打开 python.py 您喜欢的文本编辑器保存文件.

open your py2cairo folder, go to .waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Tools, inside the folder, open python.py file with your favorite text editor.

转到第162行,将其更改为
for incstr in conf.cmd_and_log([conf.env.PYTHON_CONFIG, '--includes']).strip().split():

Go to line 162, change it to
for incstr in conf.cmd_and_log([conf.env.PYTHON_CONFIG, '--includes']).strip().split():

保存,然后退出.
再次运行./waf --configure.

Save and then exit.
Run ./waf --configure again.

这篇关于在Ubuntu 14.04上安装py2cairo问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆