You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After following the installation guide above it may happen that you still
143
+
get the following error:
144
+
145
+
```bash
146
+
no library called "cairo-2" was found
147
+
no library called "cairo" was found
148
+
no library called "libcairo-2" was found
149
+
cannot load library 'libcairo.so.2': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo.so.2'
150
+
cannot load library 'libcairo.2.dylib': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo.2.dylib'
151
+
cannot load library 'libcairo-2.dll': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo-2.dll'
152
+
```
153
+
154
+
This means that the [`cairosvg`][PyPi CairoSVG] package was installed,
155
+
but the underlying [`cairocffi`][PyPi CairoCFFI] dependency couldn't
156
+
[find][cffi-dopen] the installed library. Depending on the operating system
157
+
the library lookup process is different:
158
+
159
+
!!! tip
160
+
Before proceeding remember to fully restart any open Terminal windows, and
161
+
their parent hosts like IDEs to reload any environmental variables, which
162
+
were altered during the installation process. This might be the quick fix.
163
+
164
+
=== ":material-apple: macOS"
165
+
166
+
On macOS the library lookup checks inside paths defined in [dyld][osx-dyld].
167
+
Additionally each library `name` is checked in [three variants][find-library-macOS]
168
+
with the `libname.dylib`, `name.dylib` and `name.framework/name` format.
169
+
170
+
[Homebrew] should set every needed variable to point at the installed
171
+
library directory, but if that didn't happen, you can use the debug script
172
+
below to see what paths are looked up.
173
+
174
+
A [known workaround][cffi-issue] is to add the Homebrew lib path directly
0 commit comments