-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi there,
I encountered an issue while trying to install and run CntxtJV on macOS. Following the instructions in the Quick Start section, I cloned the repository and installed the package using pip3. However, upon running the code, I received the following error:
Error importing regex components: failed to find libmagic. Check your installation
Make sure all component files are in the 'regex_components' directory
System Info:
OS: macOS Sequoia 15.6
Python: 3.13.5
Installation method: Cloned repo + pip3 install .
Diagnosis:
After some investigation, I found that the issue was due to a missing libmagic dependency, which is required by the package but not mentioned in the installation instructions. I resolved the issue by installing libmagic via Homebrew:
brew install libmagic
This requirement is mentioned on the python-magic GitHub page, but it would be helpful if CntxtJV either:
- Included a note in the README about this dependency for macOS users, or
- Provided an alternative installation method that ensures libmagic is available (e.g., via pyproject.toml or setup.py extras)
Expected Behavior:
I expected the package to work out of the box after following the Quick Start instructions, without requiring additional system-level dependencies.
Let me know if you'd like me to submit a PR updating the README with this info!
Thanks for your work on this project!
Where this is mentioned:
- https://github.com/ahupp/python-magic
- https://stackoverflow.com/questions/76639423/installing-libmagic-with-pip-fails
- ImportError: failed to find libmagic. Check your installation YelpArchive/elastalert#1927
- https://stackoverflow.com/questions/18318076/python-magic-installation-error-importerror-failed-to-find-libmagic