pyenv on Windows

pyenv-win

https://github.com/pyenv-win/pyenv-win

pyenv-win commands

   commands     List all available pyenv commands
   local        Set or show the local application-specific Python version
   global       Set or show the global Python version
   shell        Set or show the shell-specific Python version
   install      Install 1 or more versions of Python 
   uninstall    Uninstall 1 or more versions of Python
   update       Update the cached version DB
   rehash       Rehash pyenv shims (run this after switching Python versions)
   vname        Show the current Python version
   version      Show the current Python version and its origin
   version-name Show the current Python version
   versions     List all Python versions available to pyenv
   exec         Runs an executable by first preparing PATH so that the selected Python
   which        Display the full path to an executable
   whence       List all Python versions that contain the given executable

Usage

  • Update the list of discoverable Python versions using: pyenv update command for pyenv-win 2.64.x and 2.32.x versions
  • To view a list of python versions supported by pyenv windows: pyenv install -l
  • To install a python version: pyenv install 3.5.2
    • Note: An install wizard may pop up for some non-silent installs. You’ll need to click through the wizard during installation. There’s no need to change any options in it. or you can use -q for quite installation
    • You can also install multiple versions in one command too: pyenv install 2.4.3 3.6.8
  • To set a python version as the global version: pyenv global 3.5.2
    • This is the version of python that will be used by default if a local version (see below) isn’t set.
    • Note: The version must first be installed.
  • To set a python version as the local version: pyenv local 3.5.2.
    • The version given will be used whenever python is called from within this folder. This is different than a virtual env, which needs to be explicitly activated.
    • Note: The version must first be installed.
  • After (un)installing any libraries using pip or modifying the files in a version’s folder, you must run pyenv rehash to update pyenv with new shims for the python and libraries’ executables.
    • Note: This must be run outside of the .pyenv folder.
  • To uninstall a python version: pyenv uninstall 3.5.2
  • To view which python you are using and its path: pyenv version
  • To view all the python versions installed on this system: pyenv versions

Managing virtual environments with pyenv

https://towardsdatascience.com/managing-virtual-environment-with-pyenv-ae6f3fb835f8

Theme: Overlay by Kaira 2021 Jooho L.
Close Bitnami banner
Bitnami