Kozea / CairoSVG

Convert your vector images
https://courtbouillon.org/cairosvg
GNU Lesser General Public License v3.0
754 stars 149 forks source link

OSE Error cairo-2 not found #409

Closed AshhadDevLab closed 9 months ago

AshhadDevLab commented 9 months ago

To be honest I already resolved this error by installing GTK+ Windows Runtime Environment but the question is that I created a project based on encryption and decryption, this is the source code: Enigma Guard, the issue is that the pygal chart is not appearing and giving me the error:

OSError: no library called "cairo-2" was found
no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so.2': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0x7e

What I was expecting that is there a way that a user that downloads my project can run my program without this error and without going through the hastle to install Windows Runtime Error? OR Is there a way to install this package within the source code without letting the user to download it separately.

liZe commented 9 months ago

Pygal can generate SVG graphs without using CairoSVG. What is your use case?

Is there a way to install this package within the source code without letting the user to download it separately.

It’s probably possible to build wheels that include Cairo and its dependencies, but we never tried to do this.

AshhadDevLab commented 9 months ago

Well I am generating the graph and then converting it to png, and as you mentioned above I dont have a use of CairoSVG too but still I am getting this error. By the way I am embeding the graph in my tkinter window.

liZe commented 9 months ago

Well I am generating the graph and then converting it to png

If you convert it to PNG, then you need CairoSVG.

By the way I am embeding the graph in my tkinter window.

Maybe you can try to use tksvg instead?

AshhadDevLab commented 9 months ago

Well, I reached the conclusion that pygal itself uses cairo for the rendering of images so one cannot avoid this error and the only approach is to install the GTK+ Windows Runtime Environment separately.

liZe commented 9 months ago

Well, I reached the conclusion that pygal itself uses cairo for the rendering of images so one cannot avoid this error and the only approach is to install the GTK+ Windows Runtime Environment separately.

OK.

Is there anything more we can do for you?

AshhadDevLab commented 9 months ago

No thanks for your help and time.