Robert Giczewski

Malware Analysis, Forensics, Threat Intelligence, Coding, Tech, Video Games

How to install yara python on macOS Monterey (M1)?

04 Jul 2022 » tooling

After we installed YARA from source with all available modules, the next step will be to install yara-python to use it within Python. To do so we follow the instructions from the official github page

I’m a huge fan of virtual environments, so first we set up our virtual environment and activate it.

python3 -m venv venv_dir
. venv_dir/bin/activate

To make use of our installed YARA version from the blog post before, we need to link yara-python dynamically.

git clone --recursive
cd yara-python
python build --dynamic-linking
python install

If everything worked correctly (what I hope for all our well-being), yara-python should now be installed in our Virtual Environment.