> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coze.cn/llms.txt
> Use this file to discover all available pages before exploring further.

使用 Coze Python SDK 之前，你需要先参考本文档安装 Python SDK。
## 环境准备 {#62033860}
Coze Python SDK 适用于Python 3.7 及以上版本。安装 Python SDK 之前，建议执行以下命令确认你已安装 3.7 及以上版本的 Python。
```Bash
# 查看 Python 版本  
python --version

# 回显信息显示已安装 3.8.2 版本
Python 3.8.2
```

## 安装 SDK {#5065b311}
你可以通过 pip 方式安装 Coze Python SDK，Python 3.7 以上版本已默认安装 pip。如果你使用的是 poetry 等依赖管理工具，也可以使用 `poetry add cozepy` 方式安装 SDK。对于其他依赖管理工具，可以参考对应工具的官方文档进行操作。本文档以 pip 方式安装 SDK 为例。
执行以下命令，安装 Coze Python SDK。
```Bash
pip install cozepy
```

:::tip 说明
安装 Coze Python SDK 时，默认安装最新版本。你也可以[点击此处](https://github.com/coze-dev/coze-py/releases)查看 Coze Python SDK 已发布的所有历史版本。更多信息，请参见 [README](https://github.com/coze-dev/coze-py/tree/main)。
:::
