Closed IgnatiusEzeani closed 1 year ago
Could you share more information; platform, how you installed it, the error you're seeing, what you've tried to debug already?
This PR may help :-) https://github.com/ahupp/python-magic/pull/279 In my case it occurred it's an issue with Apple M1 Silicone (I do not know how to fix it yet)
"mach-o file, but is an incompatible architecture (have (arm64), need (x86_64))"
I ran into this problem on a Apple M1 as at least one other person above did. To fix it, I installed homebrew (https://brew.sh/) and then ran brew install libmagic
After that I was able to successfully import magic
for my programs that needed them.
But does it has any sense when you are running it into a docker container?
In my case I'm also working with a M1 macbook, but everything is containerized
Having this problem inside a Linux container on a Linux machine. Also had it on a Mac. Check out this issue for hundreds of people with this problem using another project that uses this project:
In case you're Anaconda using as your environment manager:
The command to install libmagic
is:
conda install libmagic
How to fix this for Windows and with pip?
This PR may help :-) #279 In my case it occurred it's an issue with Apple M1 Silicone (I do not know how to fix it yet)
"mach-o file, but is an incompatible architecture (have (arm64), need (x86_64))"
My coworker has the same issue (running on M1 Mac). Suprisingly i had no problems despite having M1 Mac myself.
What we think differs between our setups is that my colleague installed python via homebrew and i'm using pyenv,
FInally we've been able to force it to work after following instructions in: https://medium.com/mkdir-awesome/how-to-install-x86-64-homebrew-packages-on-apple-m1-macbook-54ba295230f
But does feel like workaround not proper solution
@ahupp PR #279 really could have saved us a lot of debugging.
@KaczuH yeah swallowing was a bad call. I don't think there's anything else to do with this issue since it's a local install problem and once in python I'm not sure how to detect it. Closing issue, feel free to re-open if there's anything else to do.
My installation could not find libmagic. Any suggestions?