I also tried installing pycairo (via pip) but got the error message ERROR: Command "'c:\.\python36-32\python.exe' -u -c 'import setuptools, tokenize _file_='"'"'C:\\.\\pip-install-peqhj3x1\\pycairo\\setup.py'"'"' f=getattr(tokenize, '"'"'open'"'"', open)(_file_) code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"') f.close() exec(compile(code, _file_, '"'"'exec'"'"'))' install -record 'C:\.\Temp\pip-record-jfozfbuc\install-record.txt' -single-version-externally-managed -compile" failed with error code 1 in C:\.\pip-install-peqhj3x1\pycairo\ĮDIT: I was finally able to obtain pycairo from I am sure I did something wrong in the process but after hours of searching still could not figure out how to get it to work. S = cairo.ImageSurface(cairo.FORMAT_ARGB32, 100, 100)Īfter trying those scripts, I kept getting the error message: AttributeError: module 'rsvg' has no attribute 'Handle' ![]() L.rsvg_handle_render_cairo(self.handle, z.ctx) L.rsvg_handle_get_dimensions(self.handle,byref(svgDim)) Self.handle = l.rsvg_handle_new_from_file(self.path,error) _fields_ = [("PyObject_HEAD", c_byte * object._basicsize_), Surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, int(width), int(height)) I tried using the code: import tkinter as tk ![]() They import fine but I cannot figure out how to use them. I got rsvg from here and cairo from here and then extracted the folders to the 'C:\Users.\site_packages' folder. I found from the post here that it is possible with the help from rsvg and cairo. I have been trying to put the image from into a Tkinter frame.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |