1、在编辑器当前程序中加入如下代码,修改默认编码:#! /usr/bin/env python# -*- coding: utf-8 -*-import sysreload(sys)sys.setdefaultencoding('utf8')