# Python

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/zh-cn/help/clion/llms.txt).

要在 CLion 中开发 Python 脚本：

* 请下载并安装 [Python](http://www.python.org/)。

* 确保捆绑的 Python Community Edition 插件 已 [启用](managing-plugins.html#open-plugin-settings)。

* 配置至少一个 [Python interpreter](configuring-available-python-interpreters.html)。

如果您是 Windows 用户，我们建议您安装 [Python for Windows](https://www.python.org/downloads/windows/)。

> **Note:**
> CLion 暂不支持 WSL 中的 Python 解释器。 欢迎您投票或订阅相关的 YouTrack 问题： [CPP-13470](https://youtrack.jetbrains.com/issue/CPP-13470/Combine-CLion-and-PyCharm-Professional)。

## 支持的版本

* Python 2： 版本 2.7

* Python 3： 从 3.9 版本到 3.15 版本

> **Note:**
> CLion 中的所有 Python 功能在 Python 3.9 或更高版本中都完全支持。 对于旧版本，某些功能可能会受到各个工具支持情况的限制。
>
>
>
> 例如，创建新环境需要 Python 3.8 或更高版本。 对于基于 Python 3.7 及更旧版本的新项目，请在终端中创建新环境，然后 [在 CLion 中选择它](configuring-available-python-interpreters.html#existing-virtual-environment)。

以下功能作为 Python 3.15 支持的一部分提供：

* [PEP 800 – 类型系统中的不相交基类](https://peps.python.org/pep-0800/)

* [PEP 728 – 带类型额外项的 TypedDict](https://peps.python.org/pep-0728/)

* [PEP 747 – 标注类型形式](https://peps.python.org/pep-0747/)

* [PEP 810 – 显式延迟导入](https://peps.python.org/pep-0810/)

以下功能作为对 Python 3.14 支持的一部分提供:

* [PEP 750 – 模板字符串](https://peps.python.org/pep-0750/)

* [PEP 765 – 禁止导致退出 finally 块的 return/break/continue](https://peps.python.org/pep-0765/)

* [PEP 649 — 使用描述符延迟计算注解](https://peps.python.org/pep-0649/)

* [PEP 758 — 允许在没有括号的情况下使用 except 和 except* 表达式](https://peps.python.org/pep-0758/)

以下功能作为对 Python 3.13 支持的一部分提供:

* [PEP 696 – 类型参数的默认值](https://peps.python.org/pep-0696/)

* [PEP 702 – 使用类型系统标记弃用](https://peps.python.org/pep-0702/)

* [PEP 742 – 使用 TypeIs 缩小类型](https://peps.python.org/pep-0742/)

* [PEP 705 – TypedDict：只读项](https://peps.python.org/pep-0705/)

以下功能是 Python 3.12 支持的一部分：

* [PEP 695 – 类型参数语法](https://peps.python.org/pep-0695/)

* [PEP 669 – CPython 的低影响监控](https://peps.python.org/pep-0669/)

* [PEP 701 – f 字符串的语法形式化](https://peps.python.org/pep-0701/)

* [PEP 698—用于静态类型的覆盖装饰器](https://peps.python.org/pep-0698/)

* [PEP 692 – 使用 TypedDict 来更精确地定义 **kwargs 类型](https://peps.python.org/pep-0692/)

以下功能作为对 Python 3.11 支持的一部分提供：

* [PEP 673 - Self 类型](https://peps.python.org/pep-0673/)

* [PEP 646 – 可变泛型](https://peps.python.org/pep-0646/)

* [PEP 654 – 异常组与 except*](https://peps.python.org/pep-0654/)

* [PEP 655 – 将单个 TypedDict 条目标记为必需或可能缺失](https://peps.python.org/pep-0655/)

* [PEP 681 – 数据类转换](https://peps.python.org/pep-0681/)

## CLion 中的 Python 支持

CLion 提供以下功能来帮助您使用 Python：

* 能够 [配置](configuring-available-python-interpreters.html)本地解释器。

* [Python 控制台](null)。

* 为 [Python](run-debug-configuration-python.html)创建运行/调试配置。

* [Python 工具支持](https://www.jetbrains.com/zh-cn/help/pycharm/lsp-tools.html)。

* 代码检查。

* 意图操作。

* 代码补全和解析。

* 内置代码格式化器和单独的 Python [代码样式设置](code-style-python.html)。

* 在 Python 代码中 [查找用法](find-highlight-usages.html)。

* [快速文档](viewing-inline-documentation.html)。

* 配置 [Python 调试器](debugger-python.html)。

> **Tip:**
> 如果您正在使用 Python 扩展模块，请参阅 [在 CLion 中调试 Python 扩展](debugging-python-extensions.html)。

