python - 我的 Python 第一步

标签 python

我正在尝试开始学习 Python,但从第一步开始我就迷糊了。 我开始使用 Hello, World,但是当我尝试运行脚本时,我得到:

Syntax Error: Non-UTF-8 code starting with '\xe9' in file C:\Documents and Settings\Home\workspace\Yassine frist stared\src\firstModule.py on line 5 but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details.

最佳答案

添加到第一行是

# -*- coding: utf-8 -*-

关于python - 我的 Python 第一步,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14041020/

相关文章:

python - 表单背后的逻辑(request.POST 或 None)

python - 我如何将一个大的 django-celery tasks.py 模块拆分成更小的 block ?

python - 如何使用 matplotlib 设置所有四个轴

python - Django 没有使用原子事务回滚

python - django-tastypie : Related data not saving

python - 控制用 attrs 定义的派生类的 init 中的参数顺序

python - 如何在不删除项目的情况下获取队列中的项目?

python - 带有 Python 2 和 Python3 内核的 Jupyter notebook

python - 如何使用 Python 解析无限滚动页面(例如 Wallbase.cc/search/sky)?

python - Django 模型 : Inherit from variable abstract base class