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

Update __init__.py #221

Merged
merged 4 commits into from
Mar 11, 2024
Merged

Update __init__.py #221

merged 4 commits into from
Mar 11, 2024

Conversation

Li-Xiang-Ideal
Copy link
Contributor

Python 3.8+ no longer searches for DLLs in PATH. Add paths in PATH manually. See PyCairo Windows Python3.8 Import Issue

@liZe
Copy link
Member

liZe commented Mar 11, 2024

Thank you!

I’ve simplified the code a little bit and used a specific environment variable called CAIROCFFI_DLL_DIRECTORIES instead of PATH (because the use of PATH was removed on purpose).

I’ve also updated the documentation.

@liZe liZe merged commit 290b5db into Kozea:master Mar 11, 2024
3 of 4 checks passed
@alexvoss
Copy link

Hi, is there a timeline for when this fix might see a release? If I understand correctly, this fixes something for Windows users that was introduced in Python 3.8, so a fair while back. I guess people must have been working around this themselves? Would be nice if there was a canonical way of addressing this.

@liZe
Copy link
Member

liZe commented Apr 27, 2024

A new version has been released.

@alexvoss
Copy link

alexvoss commented May 7, 2024

Thanks for releasing this. It works for me when adding the new environment variable. However, I am puzzled how a change introduced in Python 3.8 has these repercussions only now?

@liZe
Copy link
Member

liZe commented May 7, 2024

However, I am puzzled how a change introduced in Python 3.8 has these repercussions only now?

Almost all CairoCFFI users are on Linux, I suppose that’s why.

@alexvoss
Copy link

alexvoss commented May 7, 2024

And many on Windows are using WSL or MSYS2? Just found this evening that using Python on MSYS2 just works with just the Path set. Thanks for the info.

@liZe
Copy link
Member

liZe commented May 7, 2024

And many on Windows are using WSL or MSYS2? Just found this evening that using Python on MSYS2 just works with just the Path set. Thanks for the info.

Yes, MSYS2 is a great way to get DLLs easily installed, maintained and usable on Windows.

@eigen2017
Copy link

eigen2017 commented Aug 2, 2024

A new version has been released.

new release? do you mean cairocffi 171?
i upgraded to 171 and issue still..
i'm on windows 10
OSError: no library called "cairo-2" was found

@liZe
Copy link
Member

liZe commented Aug 2, 2024

new release? do you mean cairocffi 171?

Yes (actually, even 1.7.0).

Did you set CAIROCFFI_DLL_DIRECTORIES as explained in this PR and in the documentation?

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

Successfully merging this pull request may close these issues.

4 participants