keystone-engine / keypatch

Multi-architecture assembler for IDA Pro. Powered by Keystone Engine.
http://www.keystone-engine.org/keypatch
GNU General Public License v2.0
1.49k stars 355 forks source link

No module named 'keystone' on OSX #12

Closed 0xmilkmix closed 8 years ago

0xmilkmix commented 8 years ago

Hello,

Installed keystone engine using pip and everything is working fine from python (no venv here). However, IDA (6.95.160808 (64-bit or 32-bit)) cannot find the module.

Probably a symlink problem...

Thanks!

aquynh commented 8 years ago

at the Python prompt inside IDA, if you enter "import keystone", what is the output?

0xmilkmix commented 8 years ago

only: "ImportError: No module named keystone" in the two versions of IDA

aquynh commented 8 years ago

the reason is that IDA cannot find the Python binding of Keystone at the standard path.

can you do this to copy the whole Python binding directory of Keystone to IDA, then try again? (replace 6.8 with your actual IDA version)

$ git clone https://github.com/keystone-engine/keystone.git
$ cd keystone
$ sudo cp -r bindings/python/keystone /Applications/IDA\ Pro\ 6.8/idaq.app/Contents/MacOS/python
0xmilkmix commented 8 years ago

working that way, thanks!

aquynh commented 8 years ago

great!

btw, you can use the latest keypatch.py from Github, which fixes some important bugs in v1.0, and offers many new features.

fenderluvr commented 3 years ago

@aquynh What does this line do on MAC OS?

$ sudo cp -r bindings/python/keystone /Applications/IDA\ Pro\ 6.8/idaq.app/Contents/MacOS/python

I have the same issue on windows 10 and would like to resolve.