DIE icon indicating copy to clipboard operation
DIE copied to clipboard

DIE fails to load on ida for linux

Open crowell opened this issue 10 years ago • 8 comments

import of networkx fails

image

crowell avatar Jun 20 '15 17:06 crowell

also confirmed failure on OS X

crowell avatar Jun 20 '15 17:06 crowell

Did you install the requirements? (using pip install -r requirements.txt in DIE's top directory) It should solve it.

tmr232 avatar Jun 20 '15 18:06 tmr232

@tmr232 yes i did this, nope it didn't solve the issue

crowell avatar Jun 20 '15 18:06 crowell

I have never tested it on OSX\Linux versions of IDA. Have yo tries installing networkx manually?

ynvb avatar Jun 20 '15 19:06 ynvb

@ynvb yes, i installed from pip (system python) pip (virtualenv), and from the ubuntu repository.

none of them works.

I can import networkx from my python shell normally though

>>> import networkx as nx
>>> 

crowell avatar Jun 20 '15 19:06 crowell

I think it's because your IDA installation is using the Python bundled with IDA itself, not the global one. if that's the case, import networkx will fail in IDAPython - since you didn't install networkx for the bundled Python (with IDA).

Check out ~/ida-6.x/python to see if that's the case. You may simply symlink your installation of networkx to '~/ida-6.x/python/networkx`, and see if the problem solves.

This was a big pain when we were developing idalink :-(

ltfish avatar Jun 21 '15 06:06 ltfish

This solution had two main issues:

  1. It will require adding a similar symlink to each and every dependency;
  2. If the system python is not compatible to IDA's version it might cause weird errors.

If you have a compatible python version install, you can probably use one of the following solutions (untested as I do not have IDA for Linux):

  1. Symlink the entire site-packages directory, or use a .pth to link it;
  2. Use a virtualenv like script to "activate" IDA's python environment, then use pip normally.

I hope this helps.

tmr232 avatar Jun 21 '15 13:06 tmr232

with virtualenv + this plugin i got it working, debugging throws some errors about numbers being too large to convert to int, I'll try to dig a bit and give you a better bug report when i have time to dig into it.

crowell avatar Jun 21 '15 18:06 crowell