-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ImportError: failed to find libmagic. Check your installation #1927
Comments
Here too |
This worked for me: pip uninstall python-magic |
@synhershko Your solution doesn't work for me because python-magic requirement is >=0.4.15. Here is the error message:
|
I just installed libmagic and it fixed that error. I am running an alpine container |
+1. Our elastalert suddenly started failing in our CI due to libmagic not being installed. Might want to add it to the docs that it is required. Even better, don't try to import it unless a |
+1. I got the same problem when I was run elastalert at alpine container |
@primeroz , Can you tell me that how do you solve this problem, just install libmagic when build docker image? |
We've just added |
@wuxinwei as @eliasbrange mentioned just apk add libmagic |
@eliasbrange ,thank you, the solution which you mentioned solved my problem |
|
Observed the same issue while running elastalert
ule')()
File "D:\Python27\Lib\site-packages\elastalert\alerts.py", line 31, in <module
File "D:\Python27\Lib\site-packages\thehive4py\api.py", line 7, in D:\elastalert> C:\Users\u3xlbes>elastalert --start NOW --verbose
File "D:\Python27\Lib\site-packages\thehive4py\api.py", line 7, in C:\Users\u3xlbes> we are using python 2.7.15 . any workaround for this issue? |
Do we have any workaround or solution for this issue? |
Check out https://github.com/pidydx/libmagicwin64 for installing libmagic on windows. |
I have downloaded all 4 files which are mentioned in the above link and placed under C:\Windows\System32.. But when I try to import magic or import liblogic, its giving same error.
Do we need to run/configure any thing after download those 4 files? we have python 32bit on windows 2012 64 bit
|
Hi, I had the same problem. |
I love you. |
it works thank you |
This has worked for me, thanks!!! |
I have the same issue (Linux mint), I tried to remove magic by this command: |
Worked for me too. Note that I uninstalled libmagic in addition to python-magic. |
neither solution worked for me |
What is this for a crap? I get this error on Windows and Mac OS. |
Solved it by running
|
Use the method by @synhershko |
I'm on MacOS m1 and I fix this issue by installing brew install libmagic |
it really works! |
This works for my windows 11. |
I tried this by only doing Thanks!! |
this code works like magic . Easy and quick fix |
same,bro |
savior |
None of these solutions are working for me in windows. Tried installing libmagic, tried 1. pip uninstall python-magic |
This worked for me: pip uninstall python-magic |
Is not for Linux, the package is only for Widnows and MacOS https://pypi.org/project/python-magic-bin/0.4.14/#files For me it works (22.04 Ubuntu):
|
Worked for me too. |
This worked for me (M2 pro). Just make sure you use the correct version inside the |
I was using an online IDE environment (Kaggle) and this was what worked for me as well:
|
work for ubuntu 18 too |
Hello everyone, after having a lot of issues with it, the solution that worked for me was to use the following commands (use python_magic_bin without version): It downloads python-magic-bin==0.4.14 but if I mention the version, it doesn't work. Strange behavior. |
MacOS (maybe others too) $ pip install pylibmagic
$ pip install python-magic Then ensure you |
Thank you! it worked |
Follow this article for Mac users: https://nixloop.com/fix/fixing-libmagic-installation-issues-on-apple-silicon-macs-for-python/ |
This worked for me: pip uninstall python-magic I'm on Apple M2 Max. |
Not specifying the version for
|
MAC M1/M2 People, https://stackoverflow.com/a/79042514/6806531
Also within the codebase, use that: ` ` You can findyour magic.mgc file by
|
I believe this may be an issue with the
magic
package used bythehive4py/api.py
After installing elastalert v 0.1.3.6 I get the following stacktrace when I try to run an elastalert test with a folder of rules
After manually installing
libmagic
the issue persists.Has anyone else experienced this issue?
The text was updated successfully, but these errors were encountered: