pycairo

py2cairo installation failure. Checking for 'cairo' >= 1.10.0 : not found

萝らか妹 提交于 2019-12-22 06:22:34
问题 I am trying to install PyCairo (from tarball source) on my OS X 10.5 using 32-bit Python 2.7 (from python.org) and cairo 1.10.2 from MacPorts. So I am installing "py2cairo". When I run python ./waf configure , I get Checking for 'cairo' >= 1.10.0 : not found I have cairo files here... $ ls /opt/local/include/cairo cairo-deprecated.h cairo-gobject.h cairo-script-interpreter.h cairo-tee.h cairo-xlib-xrender.h cairo.h cairo-features.h cairo-pdf.h cairo-script.h cairo-version.h cairo-xlib.h cairo

How do you install PyCairo (Cairo for Python) on Windows?

我的梦境 提交于 2019-12-18 03:57:08
问题 I spent hours this afternoon trying to find a straightforward tutorial for installing PyCairo on Windows. The Cairo project itself does not maintain Windows binaries, they must be dowloaded elsehere (e.g. http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/). The process is also complicated further apparently by the fact that MSVC is apparently not a supported compiler for PyCairo (although the source patch is simple). See this bug report: https://www.libreoffice.org/bugzilla/show_bug.cgi

Build of py2cairo fails in Mac OS X with Homebrew

感情迁移 提交于 2019-12-14 03:13:00
问题 I've made the debatable decision to do some network analysis directly in Python instead of R. However, I'm having trouble getting all the igraph dependencies installed, ultimately failing with py2cairo. After updating Xcode to latest, installed cairo with Homebrew: brew install cairo A few warnings there for dependent libraries, and the brew link step failed. After chowning a few directories, I ran brew link again and it worked. Then, I uninstalled and re-installed python-igraph using pip .

How to get transparent background in window with PyGTK and PyCairo?

和自甴很熟 提交于 2019-12-12 08:09:27
问题 I've been trying really hard to create a window with no decoration and a transparent background using PyGTK. I would then draw the content of the window with Cairo. But I can't get it to work. I've tried a lot of different ways, they all failed, this is one of them #!/usr/bin/env python import pygtk pygtk.require('2.0') import gtk, sys, cairo win = None def expose (widget, event): cr = widget.window.cairo_create() #Start drawing cr.set_operator(cairo.OPERATOR_CLEAR) cr.set_source_rgba(0.5,1.0

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 .

How can I fix the problem when installing pycairo on windows?

有些话、适合烂在心里 提交于 2019-12-11 05:46:07
问题 I'm try install pycairo with pip in windows 10, but the error fired. Previously I was asked to install Microsoft Visual C ++ 14. I did the installation and now this error appeared. This is a Windows 10, running python 3 Collecting pycairo Using cached https://files.pythonhosted.org/packages/48/20/5e83af98eb897935bf7dc39455e892ba866feebb9b7c3b392982866f9958/pycairo-1.18.1.tar.gz Building wheels for collected packages: pycairo Building wheel for pycairo (setup.py) ... error Complete output from

Django: How to render image with a template

余生颓废 提交于 2019-12-11 02:38:35
问题 Objective: I would like to display a generated .png image using a template. I worked with the example here. Here is the final snippet of code from that example: def gen_chart(request): ... pp = CairoPlot.PiePlot(surface, data, heigth, width, background = None, gradient = True, shadow = True, series_colors = colors ) pp.render() response = HttpResponse(mimetype="image/png") pp.surface.write_to_png(response) return response Accessing the gen_chart view shows a pretty pie chart. However, I'd

Installing pycairo under ubuntu

天涯浪子 提交于 2019-12-10 18:51:51
问题 For some reason I can't get python to find cairo. When I did ./waf configure I got Setting top to : /home/user/pycairo/py2cairo-1.10.0 Setting out to : /home/user/pycairo/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, 2, 'final', 0) Checking for library python2.7 : yes Checking for program python2.7-config : /usr/bin/python2.7-config Checking for header Python.h : yes

how to install pycairo for python 3 on Ubuntu 10.04

隐身守侯 提交于 2019-12-10 14:30:04
问题 i am trying to install pycairo 1.10.0 for use with my custom-build python 3.1. however, sudo /flower/bin/easy_install-3.1 pycairo fails with XXX@XXXX:/adventures$ sudo /flower/bin/easy_install-3.1 pycairo install_dir /flower/lib/python3.1/site-packages/ Searching for pycairo Reading http://pypi.python.org/simple/pycairo/ Reading http://cairographics.org/pycairo Best match: pycairo 1.10.0 Downloading http://cairographics.org/releases/pycairo-1.10.0.tar.bz2 Processing pycairo-1.10.0.tar.bz2

rotate text around its center in pycairo

♀尐吖头ヾ 提交于 2019-12-09 17:53:48
问题 community. I know that there are many answers here, manuals, tutorials and references over the internets and amny more about this question. Also I know that knowledge of linear algebra is required. But when I think about time to figuring out all the theory and solving exercises in practice - my head is blowing off and I can't do the simplest things :( Please, if you know a little fast solution how to make rotation of text over its center before rendering it - tell me, pleeease. For now I have