|
Write-Output "Starting Open Interpreter installation..." |
|
Start-Sleep -Seconds 2 |
|
Write-Output "This will take approximately 5 minutes..." |
|
Start-Sleep -Seconds 2 |
|
|
|
|
|
$pyenvRoot = "${env:USERPROFILE}\.pyenv\pyenv-win" |
|
$pyenvBin = "$pyenvRoot\bin\pyenv.bat" |
|
if (!(Get-Command $pyenvBin -ErrorAction SilentlyContinue)) { |
|
|
|
$pyenvInstaller = "install-pyenv-win.ps1" |
|
$pyenvInstallUrl = "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" |
|
Invoke-WebRequest -Uri $pyenvInstallUrl -OutFile $pyenvInstaller |
|
& powershell -ExecutionPolicy Bypass -File $pyenvInstaller |
|
Remove-Item -Path $pyenvInstaller |
|
} |
|
|
|
|
|
if (!(Get-Command rustc -ErrorAction SilentlyContinue)) { |
|
Write-Output "Rust is not installed. Installing now..." |
|
$rustupUrl = "https://win.rustup.rs/x86_64" |
|
$rustupFile = "rustup-init.exe" |
|
Invoke-WebRequest -Uri $rustupUrl -OutFile $rustupFile |
|
Start-Process -FilePath .\$rustupFile -ArgumentList '-y', '--default-toolchain', 'stable' -Wait |
|
Remove-Item -Path .\$rustupFile |
|
} |
|
|
|
|
|
& "$pyenvBin" init |
|
& "$pyenvBin" install 3.11.7 --skip-existing |
|
|
|
|
|
$env:PYENV_VERSION="3.11.7" |
|
& pip install open-interpreter |
|
|
|
|
|
Remove-Item Env:\PYENV_VERSION |
|
|
|
Write-Output "" |
|
Write-Output "Open Interpreter has been installed. Run the following command to use it: " |
|
Write-Output "" |
|
Write-Output "interpreter" |