当前位置:AIGC资讯 > AIGC > 正文

bat脚本激活anaconda环境启动WebUI

首先跳转到webui所在路径:

D:

cd D:\Anaconda3\envs\NovelAI\(*)webui路径

这句话在网上搜到的bat脚本会报错:

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.

If using 'conda activate' from a batch script, change your

invocation to 'CALL conda.bat activate'.

To initialize your shell, run

$ conda init <SHELL_NAME>

Currently supported shells are:

- bash

- cmd.exe

- fish

- tcsh

- xonsh

- zsh

- powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.

加上就可以了

CALL conda init cmd.exe

激活环境:

CALL conda activate (*)环境名称

启动webui脚本:

webui-user.bat

合起来就是↓

D:
cd D:\Anaconda3\envs\NovelAI\webui
CALL conda init cmd.exe
CALL conda activate webui
webui.bat

更新时间 2023-11-27