在Python3环境下,执行代码print()的时候出现如下错误:UnicodeEncodeError: 'ascii' codec can't encode characters in position 2-66: ordinal not in range(128) 问题排查:Python3 环境下print输出编码问题 解决方法:执行代码的时候加上:PYTHONIOENCODING=utf-8 如:PYTHONIOENCODING=utf-8 python test.py