加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
setup.ps1 798 Bytes
一键复制 编辑 原始数据 按行查看 历史
bmaltais 提交于 2023-06-23 13:23 . v21.7.11
# Check if Python version meets the recommended version
$pythonVersion = & .\venv\Scripts\python.exe --version 2>$null
if ($pythonVersion -notmatch "^Python $PYTHON_VER") {
Write-Host "Warning: Python version $PYTHON_VER is recommended."
}
if (-not (Test-Path -Path "venv")) {
Write-Host "Creating venv..."
python -m venv venv
}
# Create the directory if it doesn't exist
$null = New-Item -ItemType Directory -Force -Path ".\logs\setup"
# Deactivate the virtual environment
& .\venv\Scripts\deactivate.bat
# Calling external python program to check for local modules
& .\venv\Scripts\python.exe .\setup\check_local_modules.py
& .\venv\Scripts\activate.bat
& .\venv\Scripts\python.exe .\setup\setup_windows.py
# Deactivate the virtual environment
& .\venv\Scripts\deactivate.bat
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化