Files
workspace/set-openclaw-python.ps1
aitest 15c4480db1 Add OpenClaw workspace configuration and tools
- Add agent configuration files (AGENTS.md, USER.md, IDENTITY.md, SOUL.md)
- Add git configuration and skills management scripts
- Add frontend/backend analysis tools and reports
- Add DingTalk media sender utilities and documentation
- Fix OpenClaw runtime environment (Node.js and Python)
- Configure git remotes and push scripts
2026-03-05 13:56:59 +09:00

26 lines
1.1 KiB
PowerShell

# Set OpenClaw Python to fixed version
# This ensures OpenClaw uses Python 3.14.2 regardless of pyenv changes
$OpenclawPythonPath = "F:\pyenv\pyenv-win\pyenv-win\versions\3.14.2\python.exe"
# Check if Python exists
if (Test-Path $OpenclawPythonPath) {
Write-Host "Setting OpenClaw Python to: $OpenclawPythonPath" -ForegroundColor Green
# Set for current session
[System.Environment]::SetEnvironmentVariable("OPENCLAW_PYTHON", $OpenclawPythonPath, "Process")
$env:OPENCLAW_PYTHON = $OpenclawPythonPath
# Set for user (permanent)
[System.Environment]::SetEnvironmentVariable("OPENCLAW_PYTHON", $OpenclawPythonPath, "User")
Write-Host "OpenClaw Python version:" -ForegroundColor Cyan
& $OpenclawPythonPath --version
Write-Host "Environment variable OPENCLAW_PYTHON has been set permanently." -ForegroundColor Yellow
Write-Host "OpenClaw will now use Python 3.14.2 for all skill executions." -ForegroundColor Yellow
} else {
Write-Host "Error: Python not found at $OpenclawPythonPath" -ForegroundColor Red
Write-Host "Please check if Python 3.14.2 is installed." -ForegroundColor Red
}