Questions tagged [pycairo]

A set of Python bindings for the cairo graphics library.

Pycairo is a set of Python bindings for the cairo graphics library.

Useful links:

252 questions
33
votes
6 answers

Install pycairo in virtualenv

I've tried to install pycairo in a virtualenv to use in a Django project. I've ran the pip install pycairo==1.10.0 command which finds the package and downloads it unlike other commands like pip install pycairo, etc. but when starting to install the…
Radu Gheorghiu
  • 20,049
  • 16
  • 72
  • 107
30
votes
11 answers

ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects

Error while installing manimce, I have been trying to install manimce library on windows subsystem for linux and after running pip install manimce Collecting manimce Downloading manimce-0.1.1.post2-py3-none-any.whl (249 kB) …
23
votes
7 answers

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

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.…
Claynoik
  • 303
  • 1
  • 2
  • 8
22
votes
9 answers

django OSError: no library called "cairo" was found on windows

When I run the Django server, I see this problem !! OSError: no library called "cairo" was found no library called "libcairo-2" was found cannot load library 'libcairo.so': error 0x7e cannot load library 'libcairo.2.dylib': error 0x cannot load…
Mhmoud Amsha
  • 252
  • 1
  • 2
  • 7
18
votes
2 answers

Generate character images with a font whose name cannot be correctly decoded

I am creating images of Chinese seal script. I have three true type fonts for this task (Jin_Wen_Da_Zhuan_Ti.7z, Zhong_Guo_Long_Jin_Shi_Zhuan.7z, Zhong_Yan_Yuan_Jin_Wen.7z, for testing purpose only). Below are the appearances in Microsoft Word of…
Ziyuan
  • 4,215
  • 6
  • 48
  • 77
17
votes
2 answers

Cairo GTK draw a line with transparency (like a highlighter pen)

I am trying to create a simple drawing application using Python, GTK3 and cairo. The tool should have different brushes and some kind of a highlighter pen. I figured I can use the alpha property of the stroke to create it. However, the connecting…
oz123
  • 27,559
  • 27
  • 125
  • 187
16
votes
3 answers

How to install PyCairo 1.10 on Mac OSX with default python

Has anyone installed pycairo 1.10 on the mac using the new waf build? Its failing on can't find python headers.
user317033
16
votes
3 answers

no module named cairo - python and pip

I am trying to build openuds and I get the error no module name cairo, I surfed a bit and found installing pycairo will solve it. 1) How do I fix this install error? python manage.py createcachetable Traceback (most recent call last): File…
Harry
  • 3,072
  • 6
  • 43
  • 100
12
votes
1 answer

pyCairo: How to resize and position an image?

Based on the question Create PDF with (resized) PNG images using Pycairo - rescaling Surface issue I have attempted to create code that rescales and places an image at a specific position, as shown in the code below (in this case, for example, the…
Derek
  • 197
  • 2
  • 11
12
votes
4 answers

Couldn't find foreign struct converter for 'cairo.Context'

It's me again. This is a code related to a project I'm doing called Sentiment Analysis on Twitter Data. The following code is basically used to display the number of positive and negative tweets in which I'm getting the error given below. from…
Amal Sailendran
  • 341
  • 1
  • 2
  • 16
11
votes
4 answers

rotate text around its center in pycairo

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…
Крайст
  • 776
  • 1
  • 9
  • 22
11
votes
2 answers

Is there a better library for drawing vector graphics in Python than Cairo?

...Not that I have anything against Cairo -- I love it in fact. It's just terribly difficult to install the Python bindings, especially on a Mac (see all the SO questions about installing pycairo on OS X). Are there better alternatives? Edit: For…
mjumbewu
  • 1,104
  • 5
  • 14
  • 28
11
votes
9 answers

Python : Import cairo error (2.7 & 3.6) undefined symbol: cairo_tee_surface_index

I get the following error when trying to import gtk in Python 2.7 : >>> import gtk Traceback (most recent call last): File "", line 1, in File "gtk/__init__.py", line 40, in from gtk import _gtk File…
rmn
  • 81
  • 1
  • 11
9
votes
2 answers

pycairo "ImportError: DLL load failed: The specified module could not be found." even after DLLs installed

I'm following the pycairo installation instructions here : http://www.cs.rhul.ac.uk/home/tamas/development/igraph/tutorial/install.html to install pycairo for use with igraph. However, even after running the installer and unzipping/copying all…
cip
  • 93
  • 1
  • 1
  • 3
8
votes
6 answers

get cairosvg working in windows

Trying to get this code working: import cairosvg import os path = "D:/PyProjects/Bla/Temp" os.chdir(path) cairosvg.svg2pdf(url='Pic.svg', write_to='image.pdf') but get errors along similar to this post: Traceback (most recent call last): File…
cs0815
  • 16,751
  • 45
  • 136
  • 299
1
2 3
16 17