安装uv

1
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

如果不用代理会很慢。

如果出现以下内容说明下载完成

1
2
3
4
5
6
7
8
9
PS D:\openwebui> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"                     Downloading uv 0.7.3 (x86_64-pc-windows-msvc)                                                                           Installing to C:\Users\11869\.local\bin
uv.exe
uvx.exe
everything's installed!

To add C:\Users\11869\.local\bin to your PATH, either restart your shell or run:

set Path=C:\Users\11869\.local\bin;%Path% (cmd)
$env:Path = "C:\Users\11869\.local\bin;$env:Path" (powershell)

然后运行这条指令$env:Path = "C:\Users\11869\.local\bin;$env:Path"就行了

安装启动openwebui

在你指定的地方创建数据文件夹,我创建在D:\openwebui\data

然后

1
2
3
4
5
6
7
 $env:DATA_DIR="D:\openwebui\data"; uvx --python 3.11 open-webui@latest serve
error: Failed to download https://github.com/astral-sh/python-build-standalone/releases/download/20250409/cpython-3.11.12%2B20250409-x86_64-pc-windows-msvc-install_only_stripped.tar.gz
Caused by: Request failed after 3 retries
Caused by: error sending request for url (https://github.com/astral-sh/python-build-standalone/releases/download/20250409/cpython-3.11.12%2B20250409-x86_64-pc-windows-msvc-install_only_stripped.tar.gz)
Caused by: client error (Connect)
Caused by: tcp connect error: 由于目标计算机积极拒绝,无法连接。 (os error 10061)
Caused by: 由于目标计算机积极拒绝,无法连接。 (os error 10061)

果然,还是得开代理。

安装了316个依赖包后,出现了

1
2
3
4
5
6
INFO:     Started server process [59800]████▍                                      | 31.5M/90.9M [00:57<01:08, 872kB/s]
INFO: Waiting for application startup.████████████████████████████████████████| 90.9M/90.9M [01:36<00:00, 1.74MB/s]
2025-05-13 16:55:26.445 | INFO | open_webui.utils.logger:start_logger:140 - GLOBAL_LOG_LEVEL: INFO - {}00, 280kB/s]
2025-05-13 16:55:26.445 | INFO | open_webui.main:lifespan:464 - Installing external dependencies of functions and tools... - {}ot: 100%|██████████████████████████████████████████████████████████████| 90.9M/90.9M [01:39<00:00, 2.80MB/s]
2025-05-13 16:55:26.451 | INFO | open_webui.utils.plugin:install_frontmatter_requirements:185 - No requirements found in frontmatter. - {}
2025-05-13 16:56:34.446 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 127.0.0.1:49384 - "GET / HTTP/1.1" 200 - {}

说明安装成功,此时只需要在浏览器中输入http://localhost:8080/即可登录。