Discuss / Python / 运行中文报错

运行中文报错

Topic source
print('你好')

本地learing.py 在端口上监听成功,我的版本是python 3.4 ,在博主的练习里点run结果中文报错了,请教原因

Traceback (most recent call last):
  File "/var/folders/mb/qjpn7h_x5418kt1y395s2g_80000gn/T/learn_python_x45kxb5n_py/test_13.py", line 5, in <module>
    print('\u4f60\u597d')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)

  • 1

Reply