-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_env.ps1
More file actions
30 lines (22 loc) · 919 Bytes
/
setup_env.ps1
File metadata and controls
30 lines (22 loc) · 919 Bytes
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
# PowerShell脚本:激活conda环境并安装依赖
Write-Host "正在激活conda环境 reference_processor..." -ForegroundColor Green
# 初始化conda(如果需要)
if (-not (Get-Command conda -ErrorAction SilentlyContinue)) {
Write-Host "错误:未找到conda命令。请确保Anaconda已正确安装并添加到PATH。" -ForegroundColor Red
exit 1
}
# 激活conda环境
& conda activate reference_processor
Write-Host ""
Write-Host "当前Python版本:" -ForegroundColor Cyan
python --version
Write-Host ""
Write-Host "当前pip版本:" -ForegroundColor Cyan
pip --version
Write-Host ""
Write-Host "正在安装项目依赖..." -ForegroundColor Yellow
pip install -r requirements.txt
Write-Host ""
Write-Host "环境设置完成!" -ForegroundColor Green
Write-Host "您现在可以使用以下命令运行程序:" -ForegroundColor Cyan
Write-Host " python main.py" -ForegroundColor Yellow