# 安装

## 源代码 <a href="#source-code" id="source-code"></a>

我们将 Stopwatch-Kit for Python 的完整源代码托管在 Github 的公开存储库中，您可以前往 <https://github.com/nobody-night/stopwatch-python> 获取。

## 安装 <a href="#install" id="install"></a>

{% hint style="warning" %}
下文安装示例 Shell 命令中假定 pip 和 python 指示 pip3 和 python3。
{% endhint %}

### 从 PyPI 安装 <a href="#by-pypi" id="by-pypi"></a>

通常情况下，这是您的首选安装方式。目前我们在 Python Package Index 和 SmallSO Libget 上发布并托管 Stopwatch Kit 的打包 Wheel 文件。

* Python Package Index

> **Tips**: 很抱歉，目前由于包索引名称与一个无效的包冲突，暂时不支持通过此方式安装。目前我们正在积极与无效包的所有者取得联系并获得转让。

```bash
pip install stopwatch
```

* SmallSO Libget

```bash
pip install https://libget.com/pypi/smallso/stopwatch-release-py3-none-any.whl
```

{% hint style="info" %}
若不能正常访问 PyPI 或延时过高，应选择选择通过 SmallSO Libget 拉取并安装。
{% endhint %}

### 从源代码安装 <a href="#by-source" id="by-source"></a>

* 安装依赖 Python 代码包

```bash
pip install setuptools
pip install wheel
```

* 从 Github 克隆 Python SDK 的源代码

```bash
git clone https://github.com/nobody-night/stopwatch-python.git
```

* 打包 Stopwatch Kit

```bash
cd stopwatch-python
python setup.py sdist bdist_wheel
```

* 安装 Stopwatch Kit

```bash
pip install dist/stopwatch-release-py3-none-any.whl
```

## 卸载 <a href="#uninstall" id="uninstall"></a>

{% hint style="warning" %}
下文安装示例 Shell 命令中假定 pip 和 python 指示 pip3 和 python3。
{% endhint %}

```bash
pip uninstall stopwatch
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://smallso.gitbook.io/stopwatch/python/install.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
