Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
936 stars 212 forks source link

N00b - Help changing python interpreter for binja #711

Closed securisec closed 7 years ago

securisec commented 7 years ago

Hi, hoping you guys can give me a hand. I am trying to change the default python that binja uses to one that i primarily use (brew installed). My brew installed python 2.7.13 is in my path, but binja loads python 2.7 from the default Mac install.

I am trying to accomplish this on a mac.

Thanks!

joshwatson commented 7 years ago

Use virtualenv and run Binary Ninja from it by invoking /Applications/Binary Ninja.app/Contents/MacOS/binaryninja

securisec commented 7 years ago

Thanks @joshwatson ! Although that works well, i am getting too many import issues while trying to use r2pipe. Thats why I am hoping to link it to the brew installed python

joshwatson commented 7 years ago

You just need to install the imported modules in the virtualenv as well. On Wed, Jun 14, 2017 at 22:02 securisec notifications@github.com wrote:

Thanks @joshwatson https://github.com/joshwatson ! Although that works well, i am getting too many import issues while trying to use r2pipe. Thats why I am hoping to link it to the brew installed python

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Vector35/binaryninja-api/issues/711#issuecomment-308607475, or mute the thread https://github.com/notifications/unsubscribe-auth/AFkFknI30Qagk7s6gVNa2pvhXkIqNOSyks5sEJDHgaJpZM4N6ouQ .

securisec commented 7 years ago

Yes, I realize that, and i am using the pip for virtualenv to install r2pipe, and making sure the sitepackages are correct also, but when trying to import r2pipe either via the radare plugin, i am getting all sorts of standard library import errors including urllib2, httplib, mimetools etc

securisec commented 7 years ago

Hence I will go back to the original question. Is there a way to change the interpreter that Binja is using? Specially for commercial licenses?

securisec commented 7 years ago

and if not, may i make this a feature request?

psifertex commented 7 years ago

There is not a way to specify it currently within the UI. We're currently working on a preferences system that would make it much easier to do this.

Blocking on #126

psifertex commented 7 years ago

Note that for headless you can of course use whatever Python you like.

securisec commented 7 years ago

Thanks @psifertex . I really do enjoy the headless capability of binja. You guys are doing awesome work. Just some things need a little tweaking. The plugins I find are a huge part of binja, but not being able to use them in a stable standard manner is a bit of a pain. All cool in Ubuntu, but not all cool in Mac.