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 https://github.com/VirusTotal/yara-python
cd yara-python
python setup.py build --dynamic-linking
python setup.py install
If everything worked correctly (what I hope for all our well-being), yara-python should now be installed in our Virtual Environment.