forked from Chenyme/Chenyme-AAVT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path4_点我更新库V0_8_4.bat
45 lines (37 loc) · 1.02 KB
/
4_点我更新库V0_8_4.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@echo off
chcp 65001 > nul
setlocal
set "script_path=%~dp0"
cd /d "%script_path%"
powershell -Command "Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force"
REM 检查虚拟环境是否存在
if not exist env (
echo 创建新项目环境...
python -m venv env
) else (
echo 虚拟环境已存在,跳过创建步骤
)
REM 激活新项目环境
call env\Scripts\activate.bat
REM 设置pip镜像源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
REM 检查和更新 anthropic
pip show anthropic > nul
if %errorlevel% equ 0 (
echo 更新 anthropic...
pip install --upgrade anthropic
) else (
echo 安装 anthropic...
pip install anthropic
)
REM 检查和更新 google-generativeai
pip show google-generativeai > nul
if %errorlevel% equ 0 (
echo 更新 google-generativeai...
pip install --upgrade google-generativeai
) else (
echo 安装 google-generativeai...
pip install google-generativeai
)
echo 更新完成
pause