Currently we support following ways, choose any of your comfort:
- PowerShell - easiest way
- Git Commands - default way + adding manual settings
- Pyenv-win zip - manual installation
- Python pip - for existing users
- Chocolatey
- How to use 32-train
Hurray! When you are done here are steps to Validate installation
NOTE: If you are running Windows 10 1905 or newer, you might need to disable the built-in Python launcher via Start > "Manage App Execution Aliases" and turning off the "App Installer" aliases for Python
The easiest way to install pyenv-win is to run the following installation command in a PowerShell terminal:
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"
If you are getting any UnauthorizedAccess error as below then start Windows PowerShell with the "Run as administrator" option and run Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
, now re-run the above installation command.
& : File C:\Users\kirankotari\install-pyenv-win.ps1 cannot be loaded because running scripts is disabled on this system. For
more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:173
+ ... n.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
For more information on 'digitally signed' or 'Security warning' you can refer to following issue #332
Installation is complete!
The default way to install pyenv-win, it needs git commands you need to install git/git-bash for windows
If you are using PowerShell or Git Bash use $HOME
instead of %USERPROFILE%
git clone using command prompt git clone https://github.com/pyenv-win/pyenv-win.git "%USERPROFILE%\.pyenv"
steps to add System Settings
Note: Don't forget the check above link, it contains final steps to complete.
Installation is complete!
Manual installation steps for pyenv-win
If you are using PowerShell or Git Bash use $HOME
instead of %USERPROFILE%
-
Download pyenv-win.zip
-
Create a
.pyenv
directory using command promptmkdir %USERPROFILE%/.pyenv
if not exist -
Extract and move files to
%USERPROFILE%\.pyenv\
-
Ensure there is a
bin
folder under%USERPROFILE%\.pyenv\pyenv-win
steps to add System Settings
Note: Don't forget the check above link, it contains final steps to complete.
Installation is complete!
Return to README
For existing python users
pip install pyenv-win --target %USERPROFILE%\\.pyenv
If you run into an error with the above command use the folllowing instead (#303):
pip install pyenv-win --target %USERPROFILE%\\.pyenv --no-user --upgrade
Use the same command as above, but replace %USERPROFILE%
with $HOME
.
Proceed to adding System Settings.
Installation should then be complete!
Return to README
This needs choco commands to install, installation link
Chocolatey command choco install pyenv-win
Chocolatey page: pyenv-win
Installation is complete!
Validate Installation
Return to README
It's a easy way to use PowerShell here
-
Adding PYENV, PYENV_HOME and PYENV_ROOT to your Environment Variables
[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")
-
Now adding the following paths to your USER PATH variable in order to access the pyenv command
[System.Environment]::SetEnvironmentVariable('path', $env:USERPROFILE + "\.pyenv\pyenv-win\bin;" + $env:USERPROFILE + "\.pyenv\pyenv-win\shims;" + [System.Environment]::GetEnvironmentVariable('path', "User"),"User")
Installation is done. Hurray!
Return to README
- Using Git
- For 32-train prerequisite is installing pyenv-win using Git
- Go to .pyenv dir command
cd %USERPROFILE%\.pyenv
- run
git checkout -b 32bit-train origin/32bit-train
- run
pyenv --version
and you should see 2.32.x
- Using pip
- run
pip install pyenv-win==2.32.x --target %USERPROFILE%\.pyenv
- steps to add System Settings
- run
- Using Zip
- Download pyenv-win.zip
- Follow step 2 from Pyenv-win zip
- steps to add System Settings
Return to README