pycairo

Install pycairo in virtualenv

我与影子孤独终老i 提交于 2019-11-27 10:47:46
问题 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 package it throws an error. Here's the log: Downloading/unpacking pycairo==1.10.0 Running setup.py egg_info for package pycairo Traceback (most recent call last): File "<string>", line 14, in <module> IOError: [Errno 2] No such file or directory:

Error with Python ctypes and librsvg

天涯浪子 提交于 2019-11-27 07:08:48
问题 I'm trying to wrap basic function of librsvg with ctypes for Python, but I'm getting a segfault. C: // pycairo excerpt typedef struct { PyObject_HEAD cairo_t *ctx; PyObject *base; /* base object used to create context, or NULL */ } PycairoContext; // librsvg excerpt RsvgHandle * rsvg_handle_new_from_file (const gchar * file_name, GError ** error); // ... gboolean rsvg_handle_render_cairo (RsvgHandle * handle, cairo_t * cr); Python ctypes: from ctypes import * from ctypes import util librsvg =

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

孤街浪徒 提交于 2019-11-26 17:03:34
问题 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 DLL's into the site-packages cairo directory according to the instructions, I still get the following error: >>> import cairo Traceback (most recent call last): File "", line 1, in File "c:\Python26\lib\site-packages\cairo__init__.py", line 1, in from