# Thonny

**Thonny** 是一款免费、开源的 Python 集成开发环境（IDE），专为学习编程而设计，由爱沙尼亚塔尔图大学的艾瓦尔·安纳马（Aivar Annamaa）创建。<sup>[1](https://thonny.org/)</sup><sup> • </sup><sup>[2](https://www.techradar.com/best/best-ide-for-python)</sup> 它自带 Python 解释器，因此只需一次安装即可开始编写代码；其界面经过刻意精简，对新手隐藏了高级功能。<sup>[1](https://thonny.org/)</sup> 该项目以 MIT 许可证在其 GitHub 仓库上发布，约有 4,000 个星标和 1,200 个复刻。<sup>[3](https://github.com/thonny/thonny)</sup>

| 关键事实 | 详情 |
|---|---|
| 用途 | 面向编程学习的 Python IDE，具有以初学者为中心的界面和教学可视化功能<sup>[1](https://thonny.org/)</sup><sup> • </sup><sup>[3](https://github.com/thonny/thonny)</sup> |
| 作者与起源 | 主要作者艾瓦尔·安纳马；2014–2018 年间主要在爱沙尼亚塔尔图大学计算机科学研究所开发<sup>[1](https://thonny.org/)</sup> |
| 当前版本 | 5.0.0 版，捆绑 Python 3.14；Windows 安装程序要求 Windows 10 或 11，macOS 安装程序要求至少 10.15（Catalina）<sup>[4](https://github.com/thonny/thonny/releases)</sup> |
| 调试器 | Ctrl+F5 无需断点即可逐步运行；F6 迈一大步，F7 迈一小步，步进遵循程序结构而非仅按代码行推进<sup>[1](https://thonny.org/)</sup> |
| 微控制器支持 | 可切换 Python、MicroPython 和 CircuitPython 解释器，覆盖树莓派 Pico、RP2040 开发板、ESP32/8266 及 BBC micro:bit<sup>[5](https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11)</sup> |
| 分发方式 | 随树莓派操作系统预装；也可通过 pip、Homebrew、Flatpak、Snap、apt 和 dnf 获取<sup>[1](https://thonny.org/)</sup><sup> • </sup><sup>[6](https://www.raspberrypi.org/blog/raspberry-pi-pico-classroom-physical-computing/)</sup> |
| 许可证与代码 | 在 GitHub 上以 MIT 许可证开源，约 4,000 个星标和 1.2k 个复刻<sup>[3](https://github.com/thonny/thonny)</sup> |

## 起源与发展

Thonny 的主要作者是艾瓦尔·安纳马，项目的设计决策由他做出。2014 年至 2018 年间，主要开发工作在爱沙尼亚塔尔图大学计算机科学研究所进行。自 2018 年 9 月起，开发工作部分得到爱沙尼亚软件公司 Cybernetica AS 的支持，3.0 和 3.3 版本中的若干功能由树莓派基金会提出并支持。<sup>[1](https://thonny.org/)</sup> 该项目在两篇早期学术论文中介绍了自身：一篇在 ITiCSE'15 上发表的海报论文《Thonny，一款面向编程学习的 Python IDE》，以及一篇在 Koli Calling'15 上发表的短文《介绍 Thonny，一款面向编程学习的 Python IDE》。<sup>[1](https://thonny.org/)</sup>

## 面向初学者的功能

初始用户界面剔除了可能分散初学者注意力的功能，编辑器会高亮显示新手常见的语法错误，如未闭合的引号和括号。<sup>[1](https://thonny.org/)</sup> 变量视图展示程序和 shell 命令如何影响 Python 变量，变量出现处会被高亮，以提醒学习者同一名称并不总意味着同一变量；局部变量与全局变量在视觉上有所区分。<sup>[1](https://thonny.org/)</sup>

**可视化求值。** 借助调试器的小步进功能，Thonny 展示 Python 如何对表达式求值，在高亮框中逐块用子表达式的值替换子表达式。步入函数调用会打开一个新窗口，其中包含独立的局部变量表和代码指针——项目特别指出，这种表示方式对理解递归很重要。<sup>[1](https://thonny.org/)</sup> 变量首先以简化模型（名称 → 值）呈现，当学习者准备好理解引用时，可以切换到更真实的模型（名称 → 地址/标识 → 值）。<sup>[1](https://thonny.org/)</sup>

**工具。** Thonny 包含用于探索 API 的代码补全、一个对初学者友好的系统 shell（其中 PATH 以及与其他 Python 解释器的冲突会被自动处理），以及位于“工具 → 管理包”下的 pip 包安装图形界面。<sup>[1](thonny.org)</sup> 编辑器还会在用户输入时自动缩进，这在 Python 中很重要，因为缩进界定了函数、循环和类。<sup>[2](https://www.techradar.com/best/best-ide-for-python)</sup>

## 调试器

Thonny 的调试器是其最具特色的教学功能。按下 Ctrl+F5 而非 F5，程序无需断点即可逐步运行；F6 迈一大步，F7 迈一小步。<sup>[1](https://thonny.org/)</sup> 内置帮助区分了一种“更友好”模式（推荐给完全初学者，其中第一条语句被高亮，学习者明确命令每一步）和一种“更快”模式；程序也可以用 Birdseye 运行，事后再探索执行步骤。<sup>[7](https://github.com/thonny/thonny/blob/master/thonny/plugins/help/debuggers.rst)</sup> 在“更友好”模式下，“单步跳过”（F6）执行高亮的代码，而“单步进入”（F7）深入到语句和表达式的更小部分，当某个组件没有子部分时则回退为执行。<sup>[7](https://github.com/thonny/thonny/blob/master/thonny/plugins/help/debuggers.rst)</sup> 评论者指出，调试器在程序运行时显示变量状态，他们认为这比在代码中散布 print() 语句是更好的做法。<sup>[2](https://www.techradar.com/best/best-ide-for-python)</sup>

## 微控制器与教育

通过其解释器选择器，一次 Thonny 安装即可编写 Python、MicroPython 和 CircuitPython，面向本地 Python、树莓派 Pico 和 Pico 2 开发板、其他 RP2040 开发板、ESP32/ESP8266 以及 BBC micro:bit。<sup>[5](https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11)</sup> 树莓派基金会推荐 Thonny 作为课堂和俱乐部中为 Pico 编程的软件，树莓派操作系统也预装了该 IDE。<sup>[6](https://www.raspberrypi.org/blog/raspberry-pi-pico-classroom-physical-computing/)</sup><sup> • </sup><sup>[2](https://www.techradar.com/best/best-ide-for-python)</sup>

这种组合使 Thonny 成为计算机教育中的常用工具。2023 年发表在《教育计算研究杂志》上的一项研究利用 Thonny 在编程过程中记录活动并能回放编程过程这一特性，在入门课程中基于日志分析提供反馈。<sup>[8](https://eric.ed.gov/?id=EJ1379475)</sup> 后续研究在这些日志之上构建了可视化工具，使学生的编程过程对教师可见。<sup>[9](https://arxiv.org/abs/2607.24757)</sup>

## 可扩展性与版本发布

Thonny 具有简单的扩展基础设施。第三方插件是 `thonnycontrib` 命名空间下的 Python 模块，包含一个无参数的 `load_plugin` 函数，通常通过 PyPI 分发，并通过“工具 → 管理插件”安装。<sup>[10](https://github.com/thonny/thonny/wiki/Plugins)</sup> 已知插件包括格式化工具（thonny-black-formatter）、错误解释器、用于 EV3 和 Edison 机器人的上传工具、语法主题，以及静态分析集成如 thonny-flake 和 thonny-crosshair；Thonny 开发者既不为其背书也不承担责任。<sup>[1](https://thonny.org/)</sup>

2026 年 4 月发布的 5.0.0 版原计划包含许多新功能，但最终作为中间缺陷修复版本发布，主要是为了增加对更新 Python 版本的兼容性，主版本号提升是因为捆绑包中的依赖升级；计划中的功能移至 6 版里程碑。<sup>[4](https://github.com/thonny/thonny/releases)</sup> 其破坏性变更说明了打包方式的演变：捆绑的 Python 升至 3.14，取消了 32 位 Windows 安装程序而增加了 Arm-Windows 安装程序，Intel 和 Apple 芯片 Mac 获得独立安装程序，Linux 二进制捆绑包被停用，改为基于系统 Python 创建私有虚拟环境的安装脚本。<sup>[4](https://github.com/thonny/thonny/releases)</sup>

## References

1. [Thonny, Python IDE for beginners (official site)](https://thonny.org/)
2. [Best IDE for Python of 2026, TechRadar](https://www.techradar.com/best/best-ide-for-python)
3. [thonny/thonny GitHub repository](https://github.com/thonny/thonny)
4. [Releases · thonny/thonny, GitHub](https://github.com/thonny/thonny/releases)
5. [How To Install Python on Windows 10 and 11, Tom's Hardware](https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11)
6. [Teaching with Raspberry Pi Pico in the computing classroom, Raspberry Pi Foundation](https://www.raspberrypi.org/blog/raspberry-pi-pico-classroom-physical-computing/)
7. [Using debuggers, Thonny help (debuggers.rst), GitHub](https://github.com/thonny/thonny/blob/master/thonny/plugins/help/debuggers.rst)
8. [Effectiveness of Feedback Based on Log File Analysis in Introductory Programming Courses, Journal of Educational Computing Research (ERIC EJ1379475)](https://eric.ed.gov/?id=EJ1379475)
9. [From Idea to Classroom in Days: Using "Vibe Coding" to Create a Programming Process Visualizer from IDE Activity Logs, arXiv](https://arxiv.org/abs/2607.24757)
10. [Plugins, thonny/thonny Wiki, GitHub](https://github.com/thonny/thonny/wiki/Plugins)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Development tools and collaboration infrastructure › Build, deployment, and development tooling › Integrated development environments

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/thonny

English original: https://www.edgepedia.org/thonny
