-
Notifications
You must be signed in to change notification settings - Fork 199
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
load_library cannot find libary even though lib path listed in error exists #645
Comments
Check that your LD_LIBRARY_PATH environment variable includes the path to the directory where the libMagickWand library is located. You can set it temporarily for your session using the following command: After setting the LD_LIBRARY_PATH, try importing Image again. if not try: Reinstall or Update Wand:
Can also try to configure the library path config:
OR: Debug Wand Installation:
|
I already have importing library won't work because api.py is called at initialization... setting LD_LIBRARY_PATH and reinstalling wand didn't help. |
Folks have previously reported issues with M1 when mixing native & x86_64 libraries. Try running the following in the Conda's virtual environment. >>> import ctypes
>>> ctypes.CDLL('/opt/homebrew/lib/libMagickWand-7.Q16HDRI.dylib') If an Else if the CDLL object is returned, then it's just a matter of ensuring |
I see, it does seem like an OS issue. Thanks for the help- will try Docker. |
I noticed that we catch both IO and OS errors here and raise an IO at the end of searching through all the paths- would it be beneficial to have different logic for OSError to at least keep the error message for debugging? The only concern would be if there's multiple incompatible OS installations and one compatible one, we would get noisy error messages. |
Nevermind, realized that there's no good way to differentiate between file not found and file incompatible errors besides parsing the error message. |
Context
• I have ImageMagick installed on my M1 system using Homebrew.
• I have Wand 0.6.11 installed in a Conda virtual environment with Python 3.11.5
Issue
When I run
from wand.image import Image
, I receive errorHowever when I look at my libraries installed, I do have one of the libraries in the paths tried, specifically
libMagickWand-7.Q16HDRI.dylib
ls /opt/homebrew/lib/
Wondering if there's something wrong with my setup or if anyone has debugging tips?
The text was updated successfully, but these errors were encountered: