-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
Import fails with "cannot load library 'pangoft2-1.0-0': error 0x7e" on windows, even after setting WEASYPRINT_DLL_DIRECTORIES env var #2198
Comments
Hi! You should not mix MSYS2 and Conda. Use only one of them, but not both. If you use Conda, installing Conda’s WeasyPrint should just work. If it doesn’t, then it’s a problem with your Conda installation, and there’s not much we can do for you here (I’ve never used Conda myself). If you use MSYS2 with the default install folder, it should work out of the box with Microsoft Store’s Python. If you install MSYS2 elsewhere, you can set the |
I've tried removing my venv folder and reinstalling from scratch, without setting the environment variable, but I still get the same issue... |
Let’s carefully follow the steps proposed by the documentation:
If anything goes wrong during these steps, please share what went wrong, we’ll try to find a solution. When everything works, you’ll be free to try a different way to install WeasyPrint (change MSYS2 path, install Python from elsewhere, use Conda…) We won’t be able to help you for this, but at least you’ll be able to go step by step and understand what’s exactly going on. |
@Gilthans Did you find the time to try these steps? |
Unfortunately in my case if I can't get it working in a conda environment this isn't relevant (it would require rewriting our deployment). |
If you want to use WeasyPrint with Conda, you don’t need MSYS2 at all. WeasyPrint is already packaged for Conda, with all its dependencies. |
I've tried installing the conda package, but it still cannot find the dependency, even after recreating the environment from scratch |
Hmm… The Conda packages seems to be downloaded regularly, I suppose that it works for some users. If it doesn’t work for you, maybe you’ll get more useful help by opening an issue on Conda’s bug tracker? |
I've run into the same issue. When I install the pango conda-forge on Windows, there aren't any pangoft2 libraries included with it. I see pango-1.0-0, pangocairo-1.0-0, and pangowin32-1.0-0 dlls but no pangoft2 anything. |
Looks like it’s a problem with Conda’s package. Let’s continue the discussion in conda-forge/weasyprint-feedstock#31. |
Hey there,
I've installed weasyprint using conda in a separate environment. It seems to have installed all the dependencies (at least I can find them), but importing the library via python fails with:
Could not import weasyprint: cannot load library 'pangoft2-1.0-0': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'pangoft2-1.0-0'
After following the issues, I tried setting the environment variable, and verified it was set:
I get this:
E:\msys64\mingw64\bin
Which appears to be correct (at least, it contains a
libpangoft2-1.0-0.dll
file). However, the install still fails. What else should I be checking here?The text was updated successfully, but these errors were encountered: