1

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/

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

How can I solve the problem?

4

1 回答 1

1

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

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

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

于 2015-09-20T20:56:26.737 回答