Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: no library called "cairo" was found #1240

Closed
fehernandez12 opened this issue Oct 24, 2020 · 9 comments
Closed

OSError: no library called "cairo" was found #1240

fehernandez12 opened this issue Oct 24, 2020 · 9 comments

Comments

@fehernandez12
Copy link

Before you call this a duplicate of #589, #721, #957, #1147, etc., I have tried all tips in the documentation and in those issues, I have not another GFK installed, both my Python and GFK versions are 64bit, the GFK directory is at the top of PATH variable and I have tried with both its regular path and its regular path with a slash "\".

@malnajdi
Copy link
Contributor

@fehernandez12 can you let us know:
os:
os version:
python version:
what is the output of WHERE libcairo-2.dll:

Thanks

@liZe
Copy link
Member

liZe commented Nov 8, 2020

@fehernandez12 Can you give us more information about your problem?

@Aisha-Barahim
Copy link

@fehernandez12 can you let us know:
os:
os version:
python version:
what is the output of WHERE libcairo-2.dll:

Thanks

Hi,
I am facing the same issue
os: windows 10
os version: 64 bit - x64-based-processer
Python version: Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)]
what is the output of WHERE libcairo-2.dll: C:\msys64\mingw64\bin\libcairo-2.dll
also I added C:\msys64\mingw64\bin to path and I am still getting this error:
OSError: no library called "cairo" was found
cannot load library 'C:\msys64\mingw64\bin\libcairo-2.dll': error 0x7f
cannot load library 'libcairo.so': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0x7f

@Tontyna
Copy link
Contributor

Tontyna commented Nov 10, 2020

What is your command to run WeasyPrint? What shell? Or are you within an IDE? Calling WeasyPrint as part of another project?

@Aisha-Barahim
Copy link

solved using cmd instead of git bash

@liZe
Copy link
Member

liZe commented Nov 11, 2020

solved using cmd instead of git bash

OK, thanks!

@liZe liZe closed this as completed Nov 11, 2020
@Tontyna
Copy link
Contributor

Tontyna commented Nov 11, 2020

Yepp, special settings & paths in every IDE/shell other than the default cmd. They all try to be helpful 😏

@wan-zf
Copy link

wan-zf commented Apr 30, 2021

if faced such problem when using igraph, try to " pip install pycairo", instead of " pip install cairocffi".

@imranrazakhan
Copy link

import os
os.add_dll_directory(r"C:\Program Files\GTK3-Runtime Win64\bin")

You need to call add_dll_directory() before interacting with WeasyPrint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants