Here's what I did:
go to https://github.com/radare/radare2, clone the project to my laptop and install it by sys/install.sh
(radare2 README contains all instructions)
pip install r2pipe (I have python 2.7.6 on Ubuntu 14.04)
Here's the output I got from python console:
>>> r2 = r2pipe.open("/bin/ls")
>>> print(r2.cmd("pd 10"))
;-- entry0:
0x00404890 31ed xor ebp, ebp
0x00404892 4989d1 mov r9, rdx
0x00404895 5e pop rsi
0x00404896 4889e2 mov rdx, rsp
0x00404899 4883e4f0 and rsp, 0xfffffffffffffff0
0x0040489d 50 push rax
0x0040489e 54 push rsp
0x0040489f 49c7c0d01e41. mov r8, 0x411ed0
0x004048a6 48c7c1601e41. mov rcx, 0x411e60
0x004048ad 48c7c7c02840. mov rdi, 0x4028c0 ; "AWAVAUATUH..S..H...." @ 0x4028c0
>>> print(r2.cmdj("pd 10"))
r2pipe.cmdj.Error: No JSON object could be decoded
None
Please make sure you install radare2
properly. You can try to uninstall
your current radare2 and install it from scratch in case of some version issues on radare side.