Skip to content

Fork do "pyenv for Windows" original, que esta abandonado. Funciona com as versoes mais recentes do python (python.org), atualiza a lista, fallback de download em caso de erro (implementacao nova). Engenheiro POG master, se sinta a vontade para melhorar. Versao original em https://pyenv-win.github.io/pyenv-win

License

Notifications You must be signed in to change notification settings

mauriciomenon/pyenv-win_adaptado

 
 

Repository files navigation

Fork README Release

TLDR

Recommended:

  • One-liner PowerShell (no admin, simple):
    Invoke-WebRequest -UseBasicParsing -Uri 'https://raw.githubusercontent.com/mauriciomenon/pyenv-win_adaptado/master/pyenv-win/install-pyenv-win.ps1' -OutFile "$env:TEMP\install-pyenv-win.ps1"; & "$env:TEMP\install-pyenv-win.ps1"

Execution policy friendly options:

  • Check policy first: Get-ExecutionPolicy -List
  • If scripts are blocked, prefer temporary run (no global change):
    PowerShell -NoProfile -ExecutionPolicy Bypass -Command "$u='https://raw.githubusercontent.com/mauriciomenon/pyenv-win_adaptado/master/pyenv-win/install-pyenv-win.ps1';$o=Join-Path $env:TEMP 'install-pyenv-win.ps1';for($i=1;$i -le 5;$i++){try{Invoke-WebRequest -UseBasicParsing -Headers @{'User-Agent'='Mozilla/5.0'} -Uri $u -OutFile $o -ErrorAction Stop;break}catch{if($_.Exception.Response -and $_.Exception.Response.StatusCode.value__ -eq 429){$ra=$_.Exception.Response.GetResponseHeader('Retry-After');if([int]::TryParse($ra,[ref]$s)){Start-Sleep -Seconds $s}else{Start-Sleep -Seconds ([int][math]::Pow(2,$i))}}else{throw}}};if(Test-Path $o){& $o}"
  • From CMD (no PowerShell policy change):
    powershell -NoProfile -ExecutionPolicy Bypass -Command "Invoke-WebRequest -UseBasicParsing -Uri 'https://raw.githubusercontent.com/mauriciomenon/pyenv-win_adaptado/master/pyenv-win/install-pyenv-win.ps1' -OutFile $env:TEMP\install-pyenv-win.ps1; & $env:TEMP\install-pyenv-win.ps1"

Method 2:

  • Click to install: run install.cmd (or install.ps1)

Method 3:

  • Git clone: git clone https://github.com/mauriciomenon/pyenv-win_adaptado.git %USERPROFILE%\.pyenv\pyenv-win
    git clone https://github.com/mauriciomenon/pyenv-win_adaptado.git %USERPROFILE%\.pyenv\pyenv-win

Method 4:

Install location and behavior

  • Installs to %USERPROFILE%\.pyenv\pyenv-win.
  • At the end of install, you are offered to auto-install Python (latest stable, or latest 3.10/3.11/3.12/3.13) and set it as global.
  • Uninstall via pyenv remove prompts and removes %USERPROFILE%\.pyenv\pyenv-win. If nothing exists there, it prints: pyenv remove: nothing to remove at "%USERPROFILE%\.pyenv\pyenv-win".

Commands after install (pyenv)

Action Command
List installed pyenv versions
List available pyenv install -l
Install version pyenv install 3.14.0
Uninstall pyenv uninstall 3.14.0
Set global pyenv global 3.14.0
Set local pyenv local 3.14.0
Show version pyenv version
Which python pyenv which python
Rebuild shims pyenv rehash
Doctor (check PATH) pyenv doctor

Uninstall

  • From pyenv: pyenv remove
    • Always prompts for confirmation and then removes everything under %USERPROFILE%\\.pyenv\\pyenv-win (pyenv + versions + cache).
    • Does not change PATH or shell profile automatically; prints up to 4 one‑liners (PowerShell, CMD, Git Bash) with the required privilege (User/Admin) so you can adjust PATH and check your shell config yourself.

Behavior

  • Best-effort and non-destructive to system PATH/profile: doctor and uninstaller only suggest changes with one‑liners.

About

Fork do "pyenv for Windows" original, que esta abandonado. Funciona com as versoes mais recentes do python (python.org), atualiza a lista, fallback de download em caso de erro (implementacao nova). Engenheiro POG master, se sinta a vontade para melhorar. Versao original em https://pyenv-win.github.io/pyenv-win

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • VBScript 51.6%
  • Python 25.6%
  • Batchfile 12.9%
  • PowerShell 9.8%
  • Shell 0.1%