locale -a
这个时候应该是没有en_US.UTF-8
执行
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
locale -a
vi ~/.bashrc
加入
export PYTHONIOENCODING=utf8
source ~/.bashrc
vi ~/.bash_profile
加入
export LANG="en_US.utf8"
保证这个LANG名字是local中存在的!!!
source ~/.bash_profile