2021-12-25 00:11:48 +08:00
|
|
|
---
|
|
|
|
sidebar_position: 1
|
2022-02-05 19:46:33 +08:00
|
|
|
description: 通过脚手架或 pip 安装驱动器
|
2021-12-25 00:11:48 +08:00
|
|
|
---
|
|
|
|
|
2022-01-27 21:24:56 +08:00
|
|
|
import Asciinema from "@site/src/components/Asciinema";
|
|
|
|
|
2021-12-25 00:11:48 +08:00
|
|
|
# 安装驱动器
|
|
|
|
|
2022-02-05 19:46:33 +08:00
|
|
|
NoneBot 在默认安装情况下内置了 `fastapi` 服务端驱动器,其他驱动器如 `httpx`、`aiohttp` 则需要额外安装。
|
2021-12-25 00:11:48 +08:00
|
|
|
|
|
|
|
## 查看
|
|
|
|
|
2022-02-05 19:46:33 +08:00
|
|
|
前往[商店](/store)即可查看所有驱动器。
|
2021-12-25 00:11:48 +08:00
|
|
|
|
2022-02-05 19:46:33 +08:00
|
|
|
或者使用 nb-cli 命令行查看:
|
2021-12-25 00:11:48 +08:00
|
|
|
|
|
|
|
```bash
|
|
|
|
nb driver list
|
|
|
|
```
|
|
|
|
|
|
|
|
## 安装
|
|
|
|
|
2022-02-05 19:46:33 +08:00
|
|
|
前往[商店](/store)点击复制 nb-cli 安装命令至命令行执行即可安装。
|
2021-12-25 00:11:48 +08:00
|
|
|
|
2022-01-27 21:24:56 +08:00
|
|
|
或者自行输入命令安装:
|
2021-12-25 00:11:48 +08:00
|
|
|
|
|
|
|
```bash
|
|
|
|
nb driver install <driver-name>
|
|
|
|
```
|
|
|
|
|
2022-01-27 21:24:56 +08:00
|
|
|
或者使用交互模式安装:
|
2021-12-25 00:11:48 +08:00
|
|
|
|
|
|
|
```bash
|
|
|
|
nb driver install
|
|
|
|
```
|
|
|
|
|
2022-02-05 19:46:33 +08:00
|
|
|
也可以使用 pip 安装
|
2021-12-25 00:11:48 +08:00
|
|
|
|
|
|
|
```bash
|
|
|
|
pip install <driver-name>
|
|
|
|
```
|
|
|
|
|
2022-01-27 21:24:56 +08:00
|
|
|
<Asciinema
|
|
|
|
url="https://asciinema.org/a/464686.cast"
|
|
|
|
options={{ theme: "monokai", poster: "npt:2.8" }}
|
|
|
|
/>
|