fix the compatibility of PY2 and PY3 in paddle.distributed.launch (#25304)
fix the compatibility of PY2 and PY3 in paddle.distributed.launch (#25304)

* fix the compatibility of PY2 and PY3 in paddle.distributed.launch
test=develop

* only pull log of local rank 0
test=develop

* log exception if UnicodeEncodeError occurs when pulling log in
paddle.distributed.launch
test=develop

Co-authored-by: SunGaofeng <3a354cc3a5811f4f9df78aa361ca634331504c50@gmail.com>
luotao1/Paddle,luotao1/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,luotao1/Paddle