Vector35 / Vector35/binaryninja-api

Binary Ninja fails to import editable (-e) packages from configured virtualenv

Open
#7,406 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Component: Python API Effort: Low Impact: Medium
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

Version and Platform (required):

  • Binary Ninja Version: 5.2.8275-dev (6bcfa4b7)
  • Edition: Commercial
  • OS: Debian
  • OS Version: 12
  • CPU Architecture: x64

Bug Description:
Packages installed in a virtual environment with the editable (-e) flag are not importable in Binary Ninja when the virtual environment’s site-packages is provided via the python.virtualenv setting.

Steps To Reproduce:

  1. Follow the development installation instructions for Mole (editable install, e.g., pip install -e .).
  2. Configure Binary Ninja to use your virtual environment via the python.virtualenv setting so that its site-packages is on the module search path.
  3. Start Binary Ninja and try to import moleModuleNotFoundError: No module named 'mole'.
  4. Open the Python interpreter within the same virtual environment; import mole succeeds.
Image Image

Expected Behavior:
Binary Ninja should resolve and import packages installed with the editable (-e) flag exactly as it does for non-editable installs.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using the development installation instructions in docs/01-Installation.md, an editable install, and Binary Ninja's python.virtualenv setting. Compare import behavior in Binary Ninja's Python interpreter with the same virtual environment's interpreter. Done means editable packages import successfully in Binary Ninja as non-editable packages do.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.