Vector35 / binaryninja-api

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

Plugin manager "Unable to download" on macOS with irregular python install #3730

Closed galenbwill closed 1 year ago

galenbwill commented 1 year ago

Version and Platform (required):

Bug Description: On macOS, when searching for the python interpreter executable PythonScriptingProvider._get_executable_for_libpython only looks in ./bin where . is the directory containing the python_lib. If the library and the executable are in adjacent lib and bin directories, the search fails.

This impacts installation of dependencies from the Plugin Manager, manifesting with the following trace in the log:

Unable to download 
Exception ignored on calling ctypes callback function: <bound method PythonScriptingProvider._install_modules of <binaryninja.scriptingprovider.PythonScriptingProvider object at 0x111d0e410>>
Traceback (most recent call last):
...
FileNotFoundError: [Errno 2] No such file or directory: '/.../lib/bin/python3.10'

Additional Information: Filing this issue to commit the fix against.

galenbwill commented 1 year ago

This is not a bug. I should have been using the python.binaryOverride setting to point at the non-standard executable location.

https://docs.binary.ninja/guide/settings.html#python.binaryOverride