Last active
May 17, 2024 23:10
-
-
Save itoleck/e186c57a091f033e450e6e95d843aff6 to your computer and use it in GitHub Desktop.
Install python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install Python Windows store version | |
choco install python | |
#Install pyenv-win | |
Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1" | |
#Setup env vars and path | |
[System.Environment]::SetEnvironmentVariable('PYENV',$env:USERPROFILE + "\.pyenv\pyenv-win\","User") | |
[System.Environment]::SetEnvironmentVariable('PYENV_ROOT',$env:USERPROFILE + "\.pyenv\pyenv-win\","User") | |
[System.Environment]::SetEnvironmentVariable('PYENV_HOME',$env:USERPROFILE + "\.pyenv\pyenv-win\","User") | |
[System.Environment]::SetEnvironmentVariable('path', $env:USERPROFILE + "\.pyenv\pyenv-win\bin;" + $env:USERPROFILE + "\.pyenv\pyenv-win\shims;" + [System.Environment]::GetEnvironmentVariable('path', "User"),"User") | |
Set-Alias -Name pyenv-win -Value pyenv | |
#Test install | |
pyenv --version | |
pyenv-win --version | |
#List Python versions | |
pyenv install -l | |
#Install 3.10.6 for Stable Diffusion | |
pyenv install 3.10.6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment