Vector35 / binaryninja-api

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

External Pythons throw errors resolving imports #3810

Closed CouleeApps closed 1 year ago

CouleeApps commented 1 year ago

Version and Platform (required):

Bug Description: When trying to load python on Windows 11, an error is thrown and the plugin does not load correctly.

Steps To Reproduce: Please provide all steps required to reproduce the behavior:

  1. Install binja on windows 11
  2. Install python (I used 3.10.2)
  3. Open binja
  4. Switch python interpreter to the one you installed in step 2
  5. Restart binja
  6. See error in python console

Expected Behavior: I expected python to load properly

Screenshots:

image

Additional Information: Installing packaging from pip fixes this error. Looks like it's missing from the import here: https://github.com/Vector35/binaryninja-api/commit/e4ab8f35ce16baafe11d7056d1d1304f3c057cd5#diff-60aca48317c1b5b7b3cb011b29c27ca4347c64e14cfd27d8fa0fa4b7d22d7589R17

CouleeApps commented 1 year ago

Looks like installing packaging from pip fixes this error for now. This is caused by the new deprecation module importing packaging.