-
-
Notifications
You must be signed in to change notification settings - Fork 686
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
Weasyprint startup error after updating to El Capitan (OS X 10.11) #277
Comments
Sigh :( I hear over and over from people with this kind of issue, but I still have no idea what the cause is. Here is a reduced program with many fewer moving parts than all of WeasyPrint + cairocffi: from cffi import FFI
import ctypes.util
FFI().dlopen(ctypes.util.find_library('cairo') + '') (Note: If you find some variation of it (skip |
Ok so I found a solution (without changing any of the original weasyprint or cairocffi files). Apparently OS X 10.11 introduces SIP which disables the use of DYLD path variables. To get around this I disabled SIP. The instructions to do so are here. Basically hold |
“Disable that security feature of your OS to use WeasyPrint” doesn’t sound great :/ |
no its not. for me this is only a temporary solution. There must be another way around using the DYLD path in order to be able to load cairo into Weasyprint/Cairocffi. I mean the reason we have to use that is just because MacPorts and PIP install to two different locations right? |
pip is not really involved. It’s about where macports installes dynamic libraries and how the |
Hello, I had a similar problem today, and even though it's not exactly the same error; I think it'd be helpful to post how I fixed it. Note that I installed weasyprint before (when I was using OS X 10.10) via brew. Here's the error :
That's almost the same problem (a lib not found), but it concerned a different file "libharfbuzz.0.dylib". I noticed the package "harfbuzz" was already installed by brew (in /usr/local/Cellar/harfbuzz); so I just fixed it doing :
By default, brew installs packages in /usr/local/Cellar and add some symlinks in /usr/local. It seems that the symlinks disappeared sometime during the update to OS X 10.11 ? (maybe use |
Does anyone have a problem on OSX with a fresh installation, or is it just OSX/brew randomly removing files? |
No news is good news. |
Hi, i have same problem with fresh installation of WeasyPrint on MacOS 10.11.6. Disabling a SIP doesn't work for me. If somebody have some other solution? |
Same here. Just installed WeasyPrint on an El Capitan install that has not had WeasyPrint on it before or been upgraded from previous OSX installs. Error I get is: raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names)) |
You can find on Stack Overflow that reinstalling Python could help. You can also try to uninstall and reinstall cairocffi, that's my random solution for today. Various other links:
|
Hello,
And I don't want to disable SIP as some answers were suggesting on stack overflow, tried installing and uninstalling but it didn't help. |
I managed to solve this issue, have posted the full details here http://stackoverflow.com/a/39674220/1957136 I hope someone else also find it helpful |
I'm running into this same problem today using
|
Hi @anuragjain - This solution didn't work for windows. Is there a way around this specifically for windows? |
On Windows, following the docs should work. Install only 64 bits packages (Python, Cairo, etc.) on Windows 64 bits or you'll kill kittens. |
Thanks @liZe. I have 3.5 version. Will this work with that too? |
You can try, you'll have to find the Visual C++ compiler for Python 3.5. |
I also experience the problem on a fresh install of I installed Seems like |
MacOS installation is now tested on Travis, strictly following the documentation steps. Does anyone has a problem now when following these steps? |
Closing, last comment is 1 year old. |
I'm still failing to install weasyprint on Mac OS following the official instructions. I get a bunch of warnings that might be helpful to deduce what's wrong:
produces
and
produces
And then of course running
|
@alecjacobson It means that Cairo is not in your library paths for some reason (it is on a fresh install on Travis). To add it, you can follow what's in #79, especially
|
I'm using homebrew. If I do
Then I get a different error:
|
I recently updated my OS on my mac to El Capitan and since then have been running into issues trying to run WeasyPrint. I have updated macports, uninstalled and reinstalled all of the macport dependencies. I've also uninstalled and reinstalled WeasyPrint via pip with no issues, but still it doesn't run. I also have the
export DYLD_FALLBACK_LIBRARY_PATH="/opt/local/lib"
in my ~/.profile which helped solve the import errors and allowed WeasyPrint to run before I had El Capitan installed.When i type
weasyprint --help
into the terminal i get the following output/error:Thanks
The text was updated successfully, but these errors were encountered: