出现了ascii的错误
Closed this issue · 1 comments
InDimension commented
[dimension@localhost ~]$ cd YourLesson/
[dimension@localhost YourLesson]$ . venv/bin/activate
(venv) [dimension@localhost YourLesson]$ python download_data.py
File "download_data.py", line 6
SyntaxError: Non-ASCII character '\xe4' in file download_data.py on line 6, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
(venv) [dimension@localhost YourLesson]$
请问是我哪里操作有误?
Lewin671 commented
你使用的python版本可能是python2,因为python2默认不支持中文编码,你在开头设置编码为utf8即可