Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 34 additions & 4 deletions zh/deploy/astrbot/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
> 如果部署不了,请参阅其他两个部署方式:Docker 部署和 手动部署。


## 报错:Python is not installed
## 常见报错 1:Python is not installed

如果提示 Python is not installed,并且已经安装 Python,并且**也已经重启并仍报这个错误**,说明环境变量不对,有两个方法解决:
如果提示 Python is not installed,并且已经安装 Python,并且**重启电脑仍报这个错误**,说明环境变量不对,有两个方法解决:

**方法 1:**

Expand All @@ -70,12 +70,42 @@ windows 搜索 Python,打开文件位置:

![alt text](/source/images/windows/image-1.png)

复制文件地址
复制 `python.exe` 文件地址

![image](/source/images/windows/image-2.png)

回到 `launcher_astrbot_en.bat` 文件,右键点击 `在记事本中编辑`,找到 `set PYTHON_CMD=python` 这一行,将 `python` 改为你的 Python 解释器路径或指令,路径两端的双引号不要删。

> Windows11 以下版本不能复制文件地址的,可以先复制文件夹地址再添加 /python.exe 和英文双引号

**方法 2:**

重装 python,并且在安装时勾选 `Add Python to PATH`,然后重启电脑。
重装 python,并且在安装时勾选 `Add Python to PATH`,然后重启电脑。

## 常见报错 2:You require CPython 3.14 (`cp314`)

如果出现如下内容的报错,这是由于 Python 3.14 非常新,faiss-cpu 官方还没有编译出适配 3.14 的版本。因此,安装程序找不到对应的库,你可以安装 **Python 3.10–3.13** 来规避此问题。

```
x No solution found when resolving dependencies:
`-> Because faiss-cpu==1.10.0 has no wheels with a matching Python ABI tag (e.g., `cp314`) and you require
faiss-cpu==1.10.0, we can conclude that your requirements are unsatisfiable.

hint: You require CPython 3.14 (`cp314`), but we only found wheels for `faiss-cpu` (v1.10.0) with the following
Python ABI tags: `cp39`, `cp310`, `cp311`, `cp312`, `cp313`
...
```

<img width="1756" height="874" alt="image" src="https://github.com/user-attachments/assets/a41df66e-d0f4-4033-b633-046daafc272f" />

**解决办法1:**

卸载3.14+版本的 Python ,安装 *Python 3.10–3.13* 之间的任一版本,并且在安装时 **勾选 Add Python to PATH** ,删除生成的 AstrBot 文件夹,然后重启电脑,重新运行安装脚本。

> 华为云镜像站:[Python3.12.5](https://mirrors.huaweicloud.com/python/3.12.5/python-3.12.5-amd64.exe) 或 [其他版本](https://mirrors.huaweicloud.com/python/)

**解决办法2:**

保留 Python 3.14 ,安装 *Python 3.10–3.13* 之间的任一版本,参照 **报错1:Python is not installed** 的 **方法1** 进行操作。

> PS:既然官方没有给 Python 3.14 提供预编译好的二进制包(Wheel),你可以尝试本地编译,但是极大概率会遇到各种复杂的编译错误,非常耗时且容易折腾崩,这里并不推荐。