add encode header and always use python2