Comments (5)
Please install the Cairo library using your Linux distribution’s package manager.
from cairosvg.
I get similar messages on Windows 11 with Python3.10 when I import cairosvg
. Nothing I have tried has eliminated the messages.
from cairosvg.
Nothing I have tried has eliminated the messages.
On Windows, you can install GTK3 (keeping the default options) and then reboot your computer, it will work.
from cairosvg.
Thank you for the tips. I have installed GTK3 and rebooted, these are the messages:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\Users\me> python3.10
Python 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import cairosvg;
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\cairosvg_init_.py", line 26, in
from . import surface # noqa isort:skip
File "C:\Users\me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\cairosvg\surface.py", line 9, in
import cairocffi as cairo
File "C:\Users\me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\cairocffi_init_.py", line 48, in
cairo = dlopen(
File "C:\Users\me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\cairocffi_init_.py", line 45, in dlopen
raise OSError(error_message) # pragma: no cover
OSError: no library called "cairo-2" was found
no library called "cairo" was found
cannot load library 'C:\Program Files\GTK3-Runtime Win64\bin\libcairo-2.dll': error 0x7e
cannot load library 'libcairo.so.2': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0x7e
from cairosvg.
Python found the library in 'C:\Program Files\GTK3-Runtime Win64\bin\libcairo-2.dll'
, but couldn’t use it for some reason. And to be honest, I have no idea why :/.
from cairosvg.
Related Issues (20)
- OSError: no library called "cairo-2" was found on Windows HOT 2
- Embedded Images broken on Mac? HOT 2
- embedded fonts are not working HOT 1
- Wrong svg to png conversion after latest update HOT 1
- no library called cairo-2, Cairo, libcairo-2, HOT 4
- Exception has occurred: ValueError could not convert string to float: '39px' HOT 1
- svg2pdf export turns transparent background in black HOT 3
- QR code with gradient color is broken when converted to png HOT 2
- SVGs render to an empty PNG HOT 12
- svg with improperly positioned tiled images HOT 2
- Mention `output_width` and `output_height` function arguments in documentation HOT 1
- Failed to load CairoSVG in serverless program HOT 8
- closing the path for ellipse (and circle)? HOT 2
- `text` property `shape-inside` not respected HOT 1
- Convert to WebP HOT 1
- Add rlPyCairo to requirements.txt HOT 1
- Stroke Width is not taken into account for final height / width HOT 3
- OSE Error cairo-2 not found HOT 6
- Conversion of multiple files halted with error HOT 2
- SVG to PDF render improper PNG position HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cairosvg.