Check the default version of python while building

if its 3.X, use python2 instead of python in executing codes