Setting Up a Virtual Environment¶
Sidekick is fully supported using the Python packaged with BinaryNinja, which is the preferred environment for running Sidekick. However, BinaryNinja supports using other Python environments, which can be configured using these instructions.
Create the Environment¶
The following instructions use conda
, but any virtual environment can be used. Create the environment with the following command:
NOTE: The easiest way to install
conda
on MacOS is to usebrew install miniforge
.
Install the Required Packages¶
The plugin requires Python 3.9 or later and the following packages:
requests>=2.28.2
networkx>=3.0.0
pygments>=2.14.0
intervaltree>=3.0.2
sentence-transformers>=2.2.2
scikit-learn>=1.1.3
pyjarowinkler>=1.8
Configure BinaryNinja to Use the Environment¶
Use a separate BN_USER_DIRECTORY
directory for the beta test.
-
Update your
settings.json
file to refer to thesidekick-beta
environment. -
Activate the environment:
-
Locate the paths you will need for the
settings.json
file. For example, to find the site packages directory: -
Set the paths in the
settings.json
:{ "python.binaryOverride" : "/opt/homebrew/Caskroom/miniforge/base/envs/sidekick-beta/bin/python3.9", "python.interpreter" : "/opt/homebrew/Caskroom/miniforge/base/envs/sidekick-beta/lib/libpython3.9.dylib", "python.virtualenv" : "/opt/homebrew/Caskroom/miniforge/base/envs/sidekick-beta/lib/python3.9/site-packages" }