Installing py2cairo issues on Ubuntu 14.04

陌路散爱 提交于 2019-12-11 11:24:57

问题


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:


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.



来源:https://stackoverflow.com/questions/29654934/installing-py2cairo-issues-on-ubuntu-14-04

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!