Hello dear reader. Recently, I upgraded my Linux laptop to Fedora 35. Fedora 35 comes with Python 3.10 as the system Python. Unfortunately, as documented in this GitHub issue, (do not forget to upvote!) this causes incompatibilities with Binary Ninja. Here is how I addressed this topic (standard disclaimers apply):
Initially, I decided to use Python 3.9.9 (latest and greatest at the time of writing, for 3.9 branch). I decided to install from source. Installing from source is not that difficult nor it took a disproportionately long time. I got the tarball from Python source releases, decompressed it and them it was a few simple commands:
onfigure --prefix=/opt/Python-3.9.9 --enable-shared && make && sudo make install
A few tea sips later, I had a brand new installation waiting for me. The last step was to point the
LD_LIBRARY_PATH to the required directory. I decided not to do a system-wide change, I edited instead my
.zshrc along the lines of
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/Python-3.9.9/lib .
With all this out of the way, it was a simple matter of creating a dedicated virtual environment for Python 3.9.9 that Binary Ninja could utilize:
virtualenv -p /opt/Python-3.9.9/bin/python3.9 binja-3.9
This took care of the preparation. Some sample Binary Ninja settings can look like the following:
I hope the above post will be helpful to all those that encountered this message. Until next time!