Installing py2cairo issues on Ubuntu 14.04

2019-08-09 10:52发布

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?

1条回答
我想做一个坏孩纸
2楼-- · 2019-08-09 11:42

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.

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

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

查看更多
登录 后发表回答