網(wǎng)站seo推廣站長(zhǎng)統(tǒng)計(jì)網(wǎng)站統(tǒng)計(jì)
windows下安裝openwebui有三種方式,docker,python+node.js,整合包.
這里我選擇的是第二種,非docker.
非Docker方式安裝
1. 安裝Python:
下載并安裝Python 3.11,建議安裝路徑中不要包含中文字符,并勾選“Add python 3.11 to Path”選項(xiàng)。
安裝完成后,在命令提示符中輸入python,若顯示Python版本信息則表示安裝成功。
2. 安裝Node.js和npm:
訪問(wèn)Node.js中文網(wǎng),下載并安裝較新版本的Node.js(如20.12.2),安裝過(guò)程中會(huì)自動(dòng)安裝npm。在命令提示符中輸入npm -v,若顯示npm版本信息則表示安裝成功。
3. 克隆OpenWebUI項(xiàng)目:
打開(kāi)命令行工具(如CMD、PowerShell或Git Bash),執(zhí)行以下命令克隆OpenWebUI項(xiàng)目:
git clone https://github.com/open-webui/open-webui.git
導(dǎo)航到OpenWebUI項(xiàng)目目錄,
4. 安裝npm依賴:
npm install
5. 安裝Python依賴:
pip install -r ./backend/requirements.txt
(我下載到的項(xiàng)目requirements.txt依賴管理文件在backend目錄下,具體看文件路徑)
6. 安裝uv
macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
?7. 安裝與pip
安裝Open WebUI:
pip install open-webui
更新Open WebUI
要更新到最新版本,只需運(yùn)行:
pip install --upgrade open-webui
8. 運(yùn)行Open WebUI
通過(guò)指定的 Python 版本(3.11)來(lái)啟動(dòng) open-webui
項(xiàng)目,并且將項(xiàng)目的數(shù)據(jù)存儲(chǔ)路徑設(shè)置為 C:\open-webui\data
(示例路徑),最后啟動(dòng)該項(xiàng)目的 Web 服務(wù)器,以便用戶可以通過(guò)瀏覽器訪問(wèn)。
?macOS/Linux:
DATA_DIR=~/.open-webui uvx --python 3.11 open-webui@latest serve
windows powershell:
$env:DATA_DIR="C:\open-webui\data"; uvx --python 3.11 open-webui@latest serve
此方法安裝所有必要的依賴項(xiàng)并啟動(dòng)Open WebUI,允許簡(jiǎn)單高效的設(shè)置。安裝后,可以在http://localhost:8080訪問(wèn)Open WebUI。
以后啟動(dòng)可以使用:
open-webui serve
參考🏡 Home | Open WebUI
或者是在OpenWebUI項(xiàng)目的backend目錄下,找到start_windows.bat文件并雙擊運(yùn)行。
?