title: How to import idautils outside ida pro using python
body: <p>IDApython works fine within IDA pro in the command line. However, outside IDA pro in a normal editor when I compile the python program with import idautis I get the error:</p>
  
  <p>"No module named _idaapi'</p>
  
  <pre><code>from idautils import *
  from idaapi import *
  
  ea = BeginEA()
  for funcea in Functions(SegStart(ea), SegEnd(ea)):
      functionName = GetFunctionName(funcea)
      functionStart = paddAddr(hex(funcea)[2:])
      functionEnd = paddAddr(hex(FindFuncEnd(funcea))[2:])
     &lt;REST OF THE CODE&gt;
  </code></pre>
  
  <p>how to execute the python code outside IDA pro?</p>